Elffuss BraidHub

kikocis/auto-code-rover public

main · 1.2 KiBRawPermalink
1'Poly3DCollection' object has no attribute '_facecolors2d'
2The following minimal example demonstrates the issue:
3
4```
5import numpy as np
6import matplotlib.tri as mtri
7import matplotlib.pyplot as plt
8from mpl_toolkits.mplot3d import Axes3D
9
10y,x = np.ogrid[1:10:100j, 1:10:100j]
11z2 = np.cos(x)**3 - np.sin(y)**2
12fig = plt.figure()
13ax = fig.add_subplot(111, projection='3d')
14r = ax.plot_surface(x,y,z2, cmap='hot')
15r.get_facecolors()
16```
17
18It fails on the last line with the following traceback:
19
20```
21AttributeError Traceback (most recent call last)
22<ipython-input-13-de0f41d662cd> in <module>()
23----> 1 r.get_facecolors()
24
25/home/oliver/.virtualenvs/mpl/local/lib/python2.7/site-packages/mpl_toolkits/mplot3d/art3d.pyc in get_facecolors(self)
26 634
27 635 def get_facecolors(self):
28--> 636 return self._facecolors2d
29 637 get_facecolor = get_facecolors
30 638
31
32AttributeError: 'Poly3DCollection' object has no attribute '_facecolors2d'
33```
34
35Tested with mpl versions 1.3.1 and 1.4.2.
36
37Sent here by Benjamin, from the mpl users mailing list (mail with the same title). Sorry for dumping this without more assistance, I'm not yet at a python level where I can help in debugging, I think (well, it seems daunting).
38