Open jordens opened 1 year ago
Seems like it's not happening in egui 0.28 anymore
@jordens
It is:
@YgorSouza what do you think?
It's still the same as when the issue was opened. I don't think anyone has worked on that. I noticed that this change makes the axes match perfectly:
M demo/src/plot_demo.rs
@@ -652,7 +652,7 @@ impl LinkedAxesDemo {
.link_cursor(link_group_id, self.link_cursor_x, self.link_cursor_y)
.show(ui, Self::configure_plot);
Plot::new("right-top")
- .data_aspect(2.0)
+ .data_aspect(1.9)
.width(150.0)
.height(250.0)
.y_axis_label("y")
But I don't know why. Clearly the linked axes don't deal with aspect ratio differences well, but even if we make both plots the same height and width, we have to set the aspect ratio on the second one to 1.05 instead of 1.0 for them to match. Not sure where that is coming from. Removing the data_aspect
from both plots also works, so that's probably the place to look.
Describe the bug
Linked axes are inaccurately linked. Compare the y axis of the top left and right plots in the screenshot.
There are a couple more fragility issues with axes linking but this appears to be a dominant one.
To Reproduce Steps to reproduce the behavior:
Expected behavior Correctly scaled and linked axis.
Screenshots
Desktop (please complete the following information):
Additional context egui 0.23 egui_plot 0.23 (also still occurs in current master as of fd75adb)