Set initial axis limits while preserving pan/zoom in DearPyGui

393 Views Asked by At

Using DearPyGui, the x-axis and y-axis limits of a plot can be set using the dpg.set_axis_limits function, i.e.

dpg.set_axis_limits("xaxis", xmin, xmax)
dpg.set_axis_limits("yaxis", ymin, ymax)

This does set the limits of the respective axis, but it also prevents the plot from being panned or zoomed like is available by default in a DearPyGui plot (when dpg.set_axis_limits is not used).

Is it possible to set the initial axis limits of a DearPyGui plot (similar to above) but still have the ability to pan and zoom beyond the initial axis limits?

Note: due to the structure of my data, relying on auto-formatting via dpg.set_axis_limits_auto does not work for setting the initial plot view.

0

There are 0 best solutions below