Plot
wrong bounds data aspect ratio corresponding directive and allow auto_bounds if [false,false]
#12
Labels
bug
Something isn't working
About process default bounds (enforce aspect ratio) and process allow auto_bounds.
Wrong bounds aspect ratio corresponding directive:
https://github.com/emilk/egui/blob/d77c44657206d6a5a9eda0d3b10fac6e189acc27/crates/egui_plot/src/lib.rs#L1024-L1033
My Actual comprehension of the process default bounds:
The Plot fields
min_auto_bounds: PlotBounds
andauto_bounds : AxisBool
are used for determined the enforce aspect ratio.min_auto_bounds
is determined once is initialized and on reset to initial bound else it is last_plot_transform.bounds if any axisbounds_modified.any()
or if any Nan axis!bounds_modified.any()
is preserving the current bounds.The issue is to pass good axis in
PlotTransform::set_aspect_by_changing_axis
Wrong allow auto_bounds when it used with !auto_bounds.x && !auto_bounds.
Only allow auto_bounds need to be true if it used like plot.auto_bounds_x() or plot.auto_bounds_y() or plot.auto_bounds_x() and plot.auto_bounds_y(), but it less live auto_bounds if is !auto_bounds.x && !auto_bounds.
https://github.com/emilk/egui/blob/d77c44657206d6a5a9eda0d3b10fac6e189acc27/crates/egui_plot/src/lib.rs#L997-L999
Proposal for resolving this two issues:
or something like that :
unfixed:
auto_bounds : None
wrong_none.webm
fixed:
auto_bounds : None
fixed_autobounds_none.webm
auto_bounds : X
auto_bounds_X.webm
auto_bounds : Y
auto_bounds_Y.webm
auto_bounds : X_or_Y
auto_bounds_X_or_Y.webm
Which approach is best, is there a more suitable resolution?
The text was updated successfully, but these errors were encountered: