8000 Don't mark a patch transform as set if the parent transform is not set. · matplotlib/matplotlib@428bda7 · GitHub
[go: up one dir, main page]

Skip to content

Commit 428bda7

Browse files
committed
Don't mark a patch transform as set if the parent transform is not set.
When updating a patch from another artist, if the other artist's transform is marked as "uninitialized" (`_transformSet == False`), then don't mark the updatee's transform as set either. Typically, this occurs if the updator has not been added to an Axes yet; its transform will be set when that adding occurs. In that case, the updatee's transform also needs to be set when actually being added to an Axes.
1 parent 7673002 commit 428bda7

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

lib/matplotlib/patches.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -183,6 +183,9 @@ def update_from(self, other):
183183
self._us_dashes = other._us_dashes
184184
self.set_linewidth(other._linewidth) # also sets dash properties
185185
self.set_transform(other.get_data_transform())
186+
# If the transform of other needs further initialization, then it will
187+
# be the case for this artist too.
188+
self._transformSet = other.is_transform_set()
186189

187190
def get_extents(self):
188191
"""

0 commit comments

Comments
 (0)
0