Skip to content

Commit bdc34a2

Browse files
committed
Add function example
1 parent ee46322 commit bdc34a2

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

examples/function_svg.rs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
extern crate plotlib;
2+
3+
fn main() {
4+
let f = plotlib::function::Function::new(|x| x, 0., 10.)
5+
.style(plotlib::function::Style::new().colour("burlywood"));
6+
let v = plotlib::view::View::new().add(&f);
7+
plotlib::page::Page::single(&v).save("function.svg");
8+
}

0 commit comments

Comments
 (0)