X Tutup
Skip to content

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

@paitor

Description

@paitor

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

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

      X Tutup