8000 FIX: initialize _in_draw state as early as possible · matplotlib/matplotlib@73b28cf · GitHub
[go: up one dir, main page]

Skip to content

Commit 73b28cf

Browse files
committed
FIX: initialize _in_draw state as early as possible
1 parent 86a08b4 commit 73b28cf

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

lib/mpl_toolkits/mplot3d/art3d.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -522,6 +522,7 @@ def __init__(self, *args, zs=0, zdir='z', depthshade=True, **kwargs):
522522
This is typically desired in scatter plots.
523523
"""
524524
self._depthshade = depthshade
525+
self._in_draw = False
525526
super().__init__(*args, **kwargs)
526527
self.set_3d_properties(zs, zdir)
527528

@@ -548,7 +549,6 @@ def set_3d_properties(self, zs, zdir):
548549
# grab the current sizes as-is
549550
# In the base draw methods we access the attributes directly which
550551
# means we can not buffer the shuffling on the way out.
551-
self._in_draw = False
552552
self._sizes3d = self._sizes
553553
self._linewidths3d = self._linewidths
554554
xs, ys, zs = self._offsets3d
@@ -666,6 +666,7 @@ def patch_collection_2d_to_3d(col, zs=0, zdir='z', depthshade=True):
666666
elif isinstance(col, PatchCollection):
667667
col.__class__ = Patch3DCollection
668668
col._depthshade = depthshade
669+
col._in_draw = False
669670
col.set_3d_properties(zs, zdir)
670671

671672

0 commit comments

Comments
 (0)
0