You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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:
Run the code below.
Scroll the x-axis using the "down", "left" or "right" buttons.
Select the next graph.
See error
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:
2024-07-27.22-19-21.mp4
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:
2024-07-27.22-21-18.mp4
Standalone, minimal, complete and verifiable example
bmrv911
changed the title
Moving on the axes breaks the other plots
Moving on the axes (without going through each graph first) breaks the other plots.
Jul 28, 2024
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:
2024-07-27.22-19-21.mp4
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:
2024-07-27.22-21-18.mp4
Standalone, minimal, complete and verifiable example
The text was updated successfully, but these errors were encountered: