Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Bug with adding Patch3DCollection #1752

Closed
@akhmerov

Description

@akhmerov

Adding a self-made Patch3DCollection to Axes3D fails.

from matplotlib import pyplot
from mpl_toolkits import mplot3d
f = pyplot.figure()
ax = f.add_subplot(111, projection='3d')
ax.add_collection(mplot3d.art3d.Patch3DCollection([]))
pyplot.show() # Shows gray area, no empty axes.

The failing part is

/usr/local/lib/python2.7/dist-packages/mpl_toolkits/mplot3d/art3d.pyc in do_3d_projection(self, renderer)
316
317 def do_3d_projection(self, renderer):
--> 318 xs, ys, zs = self._offsets3d
319 vxs, vys, vzs, vis = proj3d.proj_transform_clip(xs, ys, zs, renderer.M)
320 #FIXME: mpl allows us no way to unset the collection alpha value

AttributeError: 'Patch3DCollection' object has no attribute '_offsets3d'

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