FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

Axes3D voxels is rendered incorrectly with plot_surface, plot_wireframe, or plot · Issue #13580 · matplotlib/matplotlib · GitHub

Repository navigation

Axes3D voxels is rendered incorrectly with plot_surface, plot_wireframe, or plot #13580

Closed

Description

Bug report

Bug summary

When using the voxels rendering for Axes3D, surfaces and lines are not stacked correctly in the visual perspective of the axes.

Code for reproduction

Adding the following lines to the example from matplotlib's example https://matplotlib.org/gallery/mplot3d/voxels.html produces the glitch:

(xx, yy) = np.meshgrid(x, x, indexing='ij')
zz = np.ones_like(xx) * 4
ax.plot_surface(xx, yy, zz)

or
ax.plot_wireframe(xx, yy, zz)

before the line
plt.show()

Actual outcome

Expected outcome

The plane should be rendered below the green voxels and some of the red voxels.
When rotating, some of the voxels become visible.

Matplotlib version
Using matplotlib from a miniconda distribution:

  • Operating system: linux64
  • Matplotlib version: 3.0.2
  • Matplotlib backend : Qt5Agg
  • Python version: 3.6

Thank you in advance!

Cheers,
Nicola

Activity

  1. changed the title [-]Axes3D voxels is rendered incorrectly with plot_surcafe, plot_wireframe, or plot[/-] [+]Axes3D voxels is rendered incorrectly with plot_surface, plot_wireframe, or plot[/+] on Mar 3, 2019
  2. ImportanceOfBeingErnest commented on Mar 3, 2019

    Member

    This is essentially what the My 3D plot doesn't look right at certain viewing angles paragraph of the mplot3d FAQ tells us about.

  3. Obi-Wan commented on Mar 4, 2019

    Author

    Thank you for pointing this out! I did my research before submitting the bug, but apparently I missed it, or didn't look for the right thing :)

    Anyway, do I read this correctly:

    This problem will likely not be solved until OpenGL support is added to all of the backends (patches are greatly welcomed).

    in the sense that some of the backends might give the correct output?? Or simply it means that it won't be fixed until the "reduction of 3D data down to 2D + z-order scalar" won't be removed?

  4. ImportanceOfBeingErnest commented on Mar 4, 2019

    Member

    Solving this is indeed only possible when having a true 3D renderer. This would require a major rework of the complete mplot3d module and/or a true 3D backend.
    An intermediate solution, where each face of a collection is treated independently across different artists within the "2D + z-order" framework would be possible though. Still no-one has implemented anything alike as of now.

  5. Obi-Wan commented on Mar 4, 2019

    Author

    Ok, thank you very much for the explanation!
    What should I then do with this issue? Close it, or leave it open indefinitely until this gets fixed?

  6. timhoffm commented on Jan 9, 2022

    Member

    Closing as "won't or can't fix" because there are no concrete plans to rewrite with a true 3D renderer.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions


      Back | FazBrowse Home | New Git URL