Added x and y limit setting API

This commit is contained in:
4bb4 2020-08-09 13:16:48 +02:00
parent 70eff2e3bf
commit 411086483e
2 changed files with 53 additions and 6 deletions

View file

@ -25,6 +25,8 @@ fn main() {
.size(400.0, 300.0)
.x_label("awesome x label")
.y_label("awesome y label")
.x_limits(0.0, 6.0, Condition::FirstUseEver)
.y_limits(-1.0, 3.0, Condition::FirstUseEver)
.build(|| {
PlotLine::new("Left eye").plot(&vec![2.0, 2.0], &vec![2.0, 1.0]);
PlotLine::new("Right eye").plot(&vec![4.0, 4.0], &vec![2.0, 1.0]);