| 1 | 'Poly3DCollection' object has no attribute '_facecolors2d' |
| 2 | The following minimal example demonstrates the issue: |
| 3 | |
| 4 | ``` |
| 5 | import numpy as np |
| 6 | import matplotlib.tri as mtri |
| 7 | import matplotlib.pyplot as plt |
| 8 | from mpl_toolkits.mplot3d import Axes3D |
| 9 | |
| 10 | y,x = np.ogrid[1:10:100j, 1:10:100j] |
| 11 | z2 = np.cos(x)**3 - np.sin(y)**2 |
| 12 | fig = plt.figure() |
| 13 | ax = fig.add_subplot(111, projection='3d') |
| 14 | r = ax.plot_surface(x,y,z2, cmap='hot') |
| 15 | r.get_facecolors() |
| 16 | ``` |
| 17 | |
| 18 | It fails on the last line with the following traceback: |
| 19 | |
| 20 | ``` |
| 21 | AttributeError 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 | |
| 32 | AttributeError: 'Poly3DCollection' object has no attribute '_facecolors2d' |
| 33 | ``` |
| 34 | |
| 35 | Tested with mpl versions 1.3.1 and 1.4.2. |
| 36 | |
| 37 | Sent 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 | |