textplots-rs
textplots-rs copied to clipboard
Small graphical glitches
I really like this crate, will use it in my project. Great work :D
While trying this out, I found two glitches. Maybe I configured something wrong. I also tried in my terminal, but the glitches are there too. The screenshot is from VS Code's terminal.
- Each time the lines cross, the color of the top one bleeds into the bottom one
- The end values of both lines are way above 0, but the diagram lines are drawn from the value until 0
Values for both lines;
659.29, 301.96, 417.01, 580.61, 659.73, 574.36, 450.49, 358.84, 1540.40, 591.36
508.98, 804.54, 848.70, 319.94, 1037.34, 415.30, 834.05, 538.52, 1463.05, 310.16
Code:
Chart::new(200, 100, 1.0, 10.0)
.linecolorplot(&Shape::Lines(&line1), RGB8 { r: 255, g: 0, b: 0 })
.linecolorplot(&Shape::Lines(&line2), RGB8 { r: 0, g: 255, b: 0 })
.x_axis_style(LineStyle::None)
.y_axis_style(LineStyle::None)
.x_label_format(LabelFormat::Value)
.y_label_format(LabelFormat::Value)
.display();