Open bmrv911 opened 1 month ago
Will it be easier to store current axis limits in a Python field (maybe a global variable) instead of calling get_axis_limits
? I bet the issue you're seeing happens because a plot needs to render at least one frame before you can actually use get_axis_limits
(that's my guess and I haven't checked it). You can add something like
print(f"{current_min=}, {current_max=}")
to your left_button
/right_button
/etc. wherever you call get_axis_limits
, and see how it works for the visible plot and for plots that have never been displayed. You'll probably see different values. I bet it will print "current_min=0.0, current_max=0.0" for the plot 2.
Version of Dear PyGui
Version: 1.11.1 Operating System: Windows 11
My Issue/Question
When viewing a pair of plots, it is necessary to go through each one so that when adjusting the x-axis with buttons (in this case), the other plot(s) don't break. However, pressing the scroll button on the x-axis before scrolling through each plot causes the not-displayed plots to break.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
We should see the other graphs with or without pressing the axis shift buttons.
Screenshots/Video
Note that by selecting all the plots, and then scrolling along the x-axis, the scrolling occurs for both plots correctly:
https://github.com/user-attachments/assets/2cefa2cd-6cac-44e4-98a4-719ef0aa5e35
Another observation you can see when running the provided code is that any shift done on the x-axis with a specific graph is assumed to not work the same for the other graphs the more shifts there are.
In this example, you can see that if we first move along the x-axis (without going through each graph previously), the other graphs break:
https://github.com/user-attachments/assets/4dc5279e-0209-402e-9f20-305403e95931
Standalone, minimal, complete and verifiable example