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
Describe the bug
The crosshair feature on a pydm plot (via enableCrosshair method) doesn't return x,y coordinates in units of corresponding plot axes, even though there only is a single y-axis present.
Expected behavior
Crosshair coordinates should follow plot coordinates in case there are no multiple y-axis.
Steps to Reproduce
Here is a simple example to demonstrate the issue:
starting the corresponding code via pydm, zooming in/out and moving a mouse prints unrelated x,y coordinates in terminal.
Possible Solution
It seems that the issue stems from the fact that all pydm plots are MultiAxisPlots, and that there are multiple ViewBoxes that are kept in a custom property to support this functionality:
It's their ranges that reflect ranges of the corresponding axes, while the default vb seems to have an arbitrary range to which the crosshair gets hooked. It's clear, that in multi axis use case a single pair of x,y coordinates would be ambiguous. But it seems buggy when the same is happening also with a plot with only a single y-axis. Alternatively, this issue could be considered as a feature request for a more useful crosshair :)
My Platform
The text was updated successfully, but these errors were encountered:
Thanks for the report and investigation into the issue! Agreed that it is definitely a MultiAxisPlot/ViewBox issue and at a minimum we will get the crosshair working again for plots with a single y axis.
Describe the bug
The crosshair feature on a pydm plot (via
enableCrosshair
method) doesn't return x,y coordinates in units of corresponding plot axes, even though there only is a single y-axis present.Expected behavior
Crosshair coordinates should follow plot coordinates in case there are no multiple y-axis.
Steps to Reproduce
Here is a simple example to demonstrate the issue:
starting the corresponding code via pydm, zooming in/out and moving a mouse prints unrelated x,y coordinates in terminal.
Possible Solution
It seems that the issue stems from the fact that all pydm plots are
MultiAxisPlot
s, and that there are multipleViewBox
es that are kept in a custom property to support this functionality:pydm/pydm/widgets/multi_axis_plot.py
Line 38 in d771043
It's their ranges that reflect ranges of the corresponding axes, while the default
vb
seems to have an arbitrary range to which the crosshair gets hooked. It's clear, that in multi axis use case a single pair of x,y coordinates would be ambiguous. But it seems buggy when the same is happening also with a plot with only a single y-axis. Alternatively, this issue could be considered as a feature request for a more useful crosshair :)My Platform
The text was updated successfully, but these errors were encountered: