Open sedenka opened 2 years ago
Functions get_axis_limits()
/set_axis_limits()
should use double precision as well. Also, I would like to be able to set time=True
for the y-axis to make graph "time vs. time" so both the coordinates should be in double.
Perhaps you may want to use ImPlotRange
instead of the ImVec2
for mvPlotAxisConfig.limits
and mvPlotAxisConfig.limits_actual
?
Another problem with the get_plot_mouse_pos()
is that it updates the position only inside of the plot, otherwise it keeps and returns old (=invalid) coordinates. I think there should be else
clause setting the coordinates to NaN.
Also all plotting functions like draw_rectangle()
should internally work with double precision in order to render the data to the correct location when using time axis.
I think it is actually a bug because:
Version of Dear PyGui
Version: 1.6.2 Operating System: Windows 10
My Issue/Question
Function
dpg.get_plot_mouse_pos()
does not return coordinates with sufficient precision. The mouse position is stored in the mvContext as float. Such precision is insufficient for time axis storing timestamps. The precision should be fixed also here and here.To Reproduce
Steps to reproduce the behavior:
Expected behavior
The first ("x") coordinate should change between 1658792466.0 and 1658792466.999 according to mouse move.
Standalone, minimal, complete and verifiable example