line/line.rs
1use splot::{Chart, Domain, Edge, Plot};
2
3fn main() {
4 let data = vec![(13, 74), (111, 37), (125, 52), (190, 66)];
5 let chart = Chart::new()
6 .title("Line Plot")
7 .domain(Domain::from(&data[..]).set_x(&[0.0, 200.0]))
8 .axis("X Axis", Edge::Bottom)
9 .axis("Y Axis", Edge::Left)
10 .plot(Plot::line("Series", &data));
11 print!("{chart}");
12}