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

Skip to content

Commit 3b4b88e

Browse files
committed
MNT: standardize pluralization of private names in 3D Collections
1 parent 4ceec69 commit 3b4b88e

File tree

2 files changed

+12
-12
lines changed

2 files changed

+12
-12
lines changed

lib/mpl_toolkits/mplot3d/art3d.py

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -834,8 +834,8 @@ def set_3d_properties(self):
834834
self.update_scalarmappable()
835835
self._sort_zpos = None
836836
self.set_zsort('average')
837-
self._facecolors3d = PolyCollection.get_facecolor(self)
838-
self._edgecolors3d = PolyCollection.get_edgecolor(self)
837+
self._facecolor3d = PolyCollection.get_facecolor(self)
838+
self._edgecolor3d = PolyCollection.get_edgecolor(self)
839839
self._alpha3d = PolyCollection.get_alpha(self)
840840
self.stale = True
841841

@@ -856,8 +856,8 @@ def do_3d_projection(self, renderer=None):
856856
xyzlist = [(txs[sl], tys[sl], tzs[sl]) for sl in self._segslices]
857857

858858
# This extra fuss is to re-order face / edge colors
859-
cface = self._facecolors3d
860-
cedge = self._edgecolors3d
859+
cface = self._facecolor3d
860+
cedge = self._edgecolor3d
861861
if len(cface) != len(xyzlist):
862862
cface = cface.repeat(len(xyzlist), axis=0)
863863
if len(cedge) != len(xyzlist):
@@ -882,8 +882,8 @@ def do_3d_projection(self, renderer=None):
882882
else:
883883
PolyCollection.set_verts(self, segments_2d, self._closed)
884884

885-
if len(self._edgecolors3d) != len(cface):
886-
self._edgecolors2d = self._edgecolors3d
885+
if len(self._edgecolor3d) != len(cface):
886+
self._edgecolors2d = self._edgecolor3d
887887

888888
# Return zorder value
889889
if self._sort_zpos is not None:
@@ -901,24 +901,24 @@ def do_3d_projection(self, renderer=None):
901901
def set_facecolor(self, colors):
902902
# docstring inherited
903903
super().set_facecolor(colors)
904-
self._facecolors3d = PolyCollection.get_facecolor(self)
904+
self._facecolor3d = PolyCollection.get_facecolor(self)
905905

906906
def set_edgecolor(self, colors):
907907
# docstring inherited
908908
super().set_edgecolor(colors)
909-
self._edgecolors3d = PolyCollection.get_edgecolor(self)
909+
self._edgecolor3d = PolyCollection.get_edgecolor(self)
910910

911911
def set_alpha(self, alpha):
912912
# docstring inherited
913913
artist.Artist.set_alpha(self, alpha)
914914
try:
915-
self._facecolors3d = mcolors.to_rgba_array(
916-
self._facecolors3d, self._alpha)
915+
self._facecolor3d = mcolors.to_rgba_array(
916+
self._facecolor3d, self._alpha)
917917
except (AttributeError, TypeError, IndexError):
918918
pass
919919
try:
920920
self._edgecolors = mcolors.to_rgba_array(
921-
self._edgecolors3d, self._alpha)
921+
self._edgecolor3d, self._alpha)
922922
except (AttributeError, TypeError, IndexError):
923923
pass
924924
self.stale = True

lib/mpl_toolkits/tests/test_mplot3d.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ def test_bar3d_lightsource():
108108
# the top facecolors compared to the default, and that those colors are
109109
# precisely the colors from the colormap, due to the illumination parallel
110110
# to the z-axis.
111-
np.testing.assert_array_equal(color, collection._facecolors3d[1::6])
111+
np.testing.assert_array_equal(color, collection._facecolor3d[1::6])
112112

113113

114114
@mpl3d_image_comparison(['contour3d.png'])

0 commit comments

Comments
 (0)