We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Hi, When plotting both the left and right y-axis, the labels on the left y-axis was not aligned:
evcxr_figure((640, 480), |root| { let x_axis = (-3.4f32..3.4).step(0.01); root.fill(&WHITE)?; let mut chart = ChartBuilder::on(&root).margin(1) .set_all_label_area_size(50) .build_cartesian_2d(-3.4f32..3.4, -1.2f32..1.2f32)?; chart.configure_mesh().x_labels(20).y_labels(10).disable_mesh() .x_desc("X") .y_desc("Y") .label_style(("sans-serif", 20, &BLACK)) .x_label_formatter(&|v| format!("{:.1}", v)) .y_label_formatter(&|v| format!("{:.1}", v)) .draw()?; chart.draw_series(LineSeries::new(x_axis.values().map(|x| (x, x.sin())), &RED))? .label("sin") .legend(|(x, y)| PathElement::new(vec![(x,y), (x+20,y)], &RED)); chart.draw_series(LineSeries::new(x_axis.values().map(|x| (x, x.cos())), &BLUE))? .label("cos") .legend(|(x, y)| PathElement::new(vec![(x,y), (x+20,y)], &BLUE)); chart.configure_series_labels() .margin(10) .position(SeriesLabelPosition::UpperLeft) .border_style(&BLACK) .label_font(("Calibri", 20)) .draw()?; Ok(()) }).style("width:60%")
here is the result, it seems that the alignment of right y-axis are affected by the negative sign:
The text was updated successfully, but these errors were encountered:
And here is another example:
Sorry, something went wrong.
No branches or pull requests
Hi,
When plotting both the left and right y-axis, the labels on the left y-axis was not aligned:
here is the result, it seems that the alignment of right y-axis are affected by the negative sign:
The text was updated successfully, but these errors were encountered: