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
Describe the bug
While auto bounds is active link_axis and link_cursor does not work if the plot data for the different plots have a different width.
link_axis
link_cursor
The linking works if the user zoom's in, but when the user double clicks to enable auto bounds the plots are unaligned again.
To Reproduce
Run the following example:
use eframe::egui; use egui_plot::Line; fn main() -> eframe::Result { let native_options = eframe::NativeOptions::default(); eframe::run_simple_native("UnalignedPlots", native_options, move |ctx, _frame| { egui::CentralPanel::default().show(ctx, |ui| { let plot_height = ui.available_height() / 2.0; egui_plot::Plot::new("Plot1") .height(plot_height) .link_axis("plot_axis", [true, false]) .link_cursor("plot_cursor", [true, false]) .show(ui, |ui| { ui.line(Line::new(vec![[0.0, 1.0], [10.0, 0.5]])); }); egui_plot::Plot::new("Plot2") .height(plot_height) .link_axis("plot_axis", [true, false]) .link_cursor("plot_cursor", [true, false]) .show(ui, |ui| { ui.line(Line::new(vec![[5.0, 0.5], [7.0, 1.0]])); }); }); }) }
Cargo.toml:
[package] name = "unaligned_plots" version = "0.1.0" edition = "2021" [dependencies] egui = "0.31" egui_plot = { git = "https://github.com/emilk/egui_plot", branch = "main" } eframe = { version = "0.31", default-features = false, features = ["x11", "default_fonts", "wgpu"] }
Expected behavior
The x axis for both the cursor and the plot should be linked even while auto bounds is active.
Screenshots
As can be seen in the image both cursor and plot axis are not aligned properly.
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Describe the bug
While auto bounds is active
link_axis
andlink_cursor
does not work if the plot data for the different plots have a different width.The linking works if the user zoom's in, but when the user double clicks to enable auto bounds the plots are unaligned again.
To Reproduce
Run the following example:
Cargo.toml:
Expected behavior
The x axis for both the cursor and the plot should be linked even while auto bounds is active.
Screenshots
As can be seen in the image both cursor and plot axis are not aligned properly.
The text was updated successfully, but these errors were encountered: