|
1 | 1 | import pytest
|
2 | 2 |
|
3 |
| -from mpl_toolkits.mplot3d import Axes3D, axes3d, proj3d |
| 3 | +from mpl_toolkits.mplot3d import Axes3D, axes3d, proj3d, art3d |
4 | 4 | from matplotlib import cm
|
5 | 5 | from matplotlib.testing.decorators import image_comparison
|
6 | 6 | from matplotlib.collections import LineCollection
|
@@ -312,6 +312,22 @@ def test_quiver3d_pivot_tail():
|
312 | 312 | ax.quiver(x, y, z, u, v, w, length=0.1, pivot='tail', normalize=True)
|
313 | 313 |
|
314 | 314 |
|
| 315 | +@image_comparison(baseline_images=['poly3dcollection_closed'], |
| 316 | + remove_text=True) |
| 317 | +def test_poly3dcollection_closed(): |
| 318 | + fig = plt.figure() |
| 319 | + ax = fig.gca(projection='3d') |
| 320 | + |
| 321 | + poly1 = np.array([[0, 0, 1], [0, 1, 1], [0, 0, 0]], np.float) |
| 322 | + poly2 = np.array([[0, 1, 1], [1, 1, 1], [1, 1, 0]], np.float) |
| 323 | + c1 = art3d.Poly3DCollection([poly1], linewidths=3, edgecolor='k', |
| 324 | + facecolor=(0.5, 0.5, 1, 0.5), closed=True) |
| 325 | + c2 = art3d.Poly3DCollection([poly2], linewidths=3, edgecolor='k', |
| 326 | + facecolor=(1, 0.5, 0.5, 0.5), closed=False) |
| 327 | + ax.add_collection3d(c1) |
| 328 | + ax.add_collection3d(c2) |
| 329 | + |
| 330 | + |
315 | 331 | @image_comparison(baseline_images=['axes3d_labelpad'], extensions=['png'])
|
316 | 332 | def test_axes3d_labelpad():
|
317 | 333 | from matplotlib import rcParams
|
|
0 commit comments