Skip to content
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

3D rendering, scatterpoints disapear near edges of surfaces #5756

Closed
paitor opened this issue Dec 29, 2015 · 2 comments
Closed

3D rendering, scatterpoints disapear near edges of surfaces #5756

paitor opened this issue Dec 29, 2015 · 2 comments

Comments

@paitor
Copy link

paitor commented Dec 29, 2015

Hi

Environment:
Linux
python 2.7.8
matplotlib 1.5.0 (installed via pip 2015-12-29)

When plotting scattered points in combination with surfaces in 3D points disapear when viewed at an angle that renders them close to the edges of the surface along the line of sight. The code below reproduces the problem. (If the resulting figure is rotated a few degrees the scatter point will be made visible).

#! /usr/bin/env python
import matplotlib
matplotlib.use('tKAgg')
import matplotlib.pyplot as plt
from mpl_toolkits.mplot3d import Axes3D
from mpl_toolkits.mplot3d.art3d import Poly3DCollection

fig = plt.figure()
ax = fig.add_subplot(111, projection='3d')
ax.scatter((0.5,), (0,), (0,))
poly = Poly3DCollection([zip((0,0,0,0,0),(1,1,-1,-1,1),(1,-1,-1,1,1))])
poly.set_facecolor((1,0,0,1))
ax.add_collection3d(poly)
ax.set_xlim3d([0,1])
ax.set_ylim3d([-1,1])
ax.set_zlim3d([-1,1])
ax.view_init(elev=-165,azim=-140)
plt.show()

regP

@WeatherGod
Copy link
Member

See here with this FAQ:
http://matplotlib.org/mpl_toolkits/mplot3d/faq.html#my-3d-plot-doesn-t-look-right-at-certain-viewing-angles

Note, the documentation should be updated to also recommend VisPy for
non-trivial 3D rendering. There is talk with the VisPy developers to one
day make parts of VisPy into a matplotlib backend, but that is probably
still a year or two out from now.

On Tue, Dec 29, 2015 at 6:46 AM, paitor notifications@github.com wrote:

Hi

DIsclaimer: My current install is 140 thus this may already have been
resolved in later versions

When plotting scattered points in combination with surfaces in 3D points
disapear when viewed at an angle that renders them close to the edges of
the surface along the line of sight The code below reproduces the problem

#! /usr/bin/env python
import matplotlib
matplotlibuse('tKAgg')
import matplotlibpyplot as plt
from mpl_toolkitsmplot3d import Axes3D
from mpl_toolkitsmplot3dart3d import Poly3DCollection

fig = pltfigure()
ax = figadd_subplot(111, projection='3d')
axscatter((05,), (0,), (0,))
poly = Poly3DCollection([zip((0,0,0,0,0),(1,1,-1,-1,1),(1,-1,-1,1,1))])
polyset_facecolor((1,0,0,1))
axadd_collection3d(poly)
axset_xlim3d([0,1])
axset_ylim3d([-1,1])
axset_zlim3d([-1,1])
axview_init(elev=-165,azim=-140)
pltshow()

regP


Reply to this email directly or view it on GitHub
#5756.

@WeatherGod
Copy link
Member

closing as "can't fix".

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

No branches or pull requests

2 participants