-
-
Notifications
You must be signed in to change notification settings - Fork 7.9k
[Bug]: 3d mouse coords values reported in toolbar are meaningless #22775
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Out of curiosity I'm trying to determine what the expected behavior is. In the case where there is no datapoint/line/surface under the cursor then it would make sense to project the mouse location directly onto the plane under the cursor. This would result in one axis always returning zero, is cheap to do, and intuitively makes sense. If a point does exist within some margin of error to the current cursor location, then its X, Y, and Z coordinates could be retrieved. However, this could be expensive to do since (depending on what assumptions can be made) for very large datasets we may have to calculate the distance to every point to find the closest, and recalculate constantly as the mouse moves. What level of approximation is possible/acceptable? A different problem arises for lines and surfaces. Do we expect interpolation between datapoints? Additionally, even if the X, Y, and Z coordinates were to be made "accurate", how do we know that an item in 3D space is correctly being referenced? If five datapoints are under the cursor at varying depths will the shallowest always be selected? It may help to display the name of the dataset that the point is from using the legend, if available. How does this compare to what is being done currently? Getting accurate results sounds very non-trivial, but certainly useful. |
I think this is the only solution that makes sense right now. Hovering over 2D plots doesn't snap to coordinates right now, and I think something like that would be required to do what @Obliman is suggesting (which would be a nice end state, just a lot of groundwork that would need to be laid first). I do think displaying these is still useful to have, contra some of the discussion in the linked post. |
Bug summary
The mouse coords reported for 3D axes are meaningless (they correspond to some arbitrarily chosen depth). In fact, I do not believe there's any canonical way to choose the values displayed. See discussion starting at #22624 (comment).
Code for reproduction
Actual outcome
Expected outcome
Don't try to display meaningless values.
Additional information
No response
Operating system
arch linux
Matplotlib Version
3.6.0.dev1926+gf670fe7879
Matplotlib Backend
mplcairo
Python version
3.10
Jupyter version
ENOSUCHLIB
Installation
git checkout
The text was updated successfully, but these errors were encountered: