def test_patch_collection_modification(fig_test, fig_ref): # Test that modifying Patch3DCollection properties after creation works. patch1 = Circle((0, 0), 0.05) patch2 = Circle((0.1, 0.1), 0.03) facecolors = np.array([[0., 0.5, 0., 1.], [0.5, 0., 0., 0.5]]) c = art3d.Patch3DCollection([patch1, patch2], linewidths=3) ax_test = fig_test.add_subplot(projection='3d') ax_test.add_collection3d(c) c.set_edgecolor('C2') c.set_facecolor(facecolors) c.set_alpha(0.7) assert c.get_depthshade() c.set_depthshade(False) assert not c.get_depthshade() patch1 = Circle((0, 0), 0.05) patch2 = Circle((0.1, 0.1), 0.03) facecolors = np.array([[0., 0.5, 0., 1.], [0.5, 0., 0., 0.5]]) c = art3d.Patch3DCollection([patch1, patch2], linewidths=3, edgecolor='C2', facecolor=facecolors, alpha=0.7, depthshade=False) ax_ref = fig_ref.add_subplot(projection='3d') ax_ref.add_collection3d(c)
def test_patch_collection_modification(fig_test, fig_ref): # Test that modifying Patch3DCollection properties after creation works. patch = Circle((0, 0), 0.05) c = art3d.Patch3DCollection([patch], linewidths=3) ax_test = fig_test.add_subplot(projection='3d') ax_test.add_collection3d(c) c.set_edgecolor('C2') c.set_facecolor('C3') c.set_alpha(0.7) assert c.get_depthshade() c.set_depthshade(False) assert not c.get_depthshade() patch = Circle((0, 0), 0.05) c = art3d.Patch3DCollection([patch], linewidths=3, edgecolor='C2', facecolor='C3', alpha=0.7, depthshade=False) ax_ref = fig_ref.add_subplot(projection='3d') ax_ref.add_collection3d(c)