-
-
Notifications
You must be signed in to change notification settings - Fork 7.9k
[Bug]: plot3d depth test is off #24767
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
Labels
Comments
I suspect that #23085 addresses this ? |
Just tested but unfortunately it doesn't seem to make a difference. |
Just FYI, you can use r, g, b = (np.array(colors) >> [[16], [8], [0]] & 0xff) / 0xff
colors = list(map('#{:06x}'.format, colors)
ax = plt.figure().add_subplot(projection="3d")
ax.scatter3D(r, g, b, c=colors)) |
Oh that's great, and it even fixes the problem, thank you! |
ubitux
added a commit
to ubitux/research
that referenced
this issue
Apr 2, 2023
…ojection This fixes the depth testing in matplotlib. See matplotlib/matplotlib#24767
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Bug summary
The depth testing of points depends only on their coordinates and doesn't take into account the camera angle.
mpl-3d-depth.mp4
Code for reproduction
Actual outcome
Whether we look from an angle or the opposite one, we always have the higher coordinates visible in front (the clear ones, that is the closest to
(1,1,1)
).Expected outcome
The darker points (
(0,0,0)
) should be in front when looking from the "bottom" angle, and the lighter points from the other angle (like currently).Additional information
No response
Operating system
Arch
Matplotlib Version
3.6.2
Matplotlib Backend
GTK3Agg
Python version
3.10.8
Jupyter version
No response
Installation
Linux package manager
The text was updated successfully, but these errors were encountered: