Browse Source

Trying to give labels more space

master
Julio Biason 1 year ago
parent
commit
5847e24ea7
  1. 1
      .gitignore
  2. 1
      plotterstest/.gitignore
  3. BIN
      plotterstest/cases.png
  4. BIN
      plotterstest/histogram.png
  5. 4
      plotterstest/src/main.rs

1
.gitignore vendored

@ -2,3 +2,4 @@
*.sw?
**/target
*.png

1
plotterstest/.gitignore vendored

@ -0,0 +1 @@
*.png

BIN
plotterstest/cases.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 103 KiB

BIN
plotterstest/histogram.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 17 KiB

4
plotterstest/src/main.rs

@ -165,14 +165,14 @@ fn main() {
root.fill(&WHITE).unwrap();
let mut chart = ChartBuilder::on(&root)
.x_label_area_size(100)
.x_label_area_size(150)
.y_label_area_size(50)
.margin(5)
.caption("Cases", ("sans-serif", 40.0))
.build_cartesian_2d((0..values.len()).into_segmented(), 0.0f64..300.0f64)
.unwrap();
let pos = Pos::new(HPos::Right, VPos::Top);
let pos = Pos::new(HPos::Left, VPos::Bottom);
let x_label_style = TextStyle::from(("sans-serif", 10).into_font())
.pos(pos)
.transform(FontTransform::Rotate90);

Loading…
Cancel
Save