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

Skip to content

Commit 1b17994

Browse files
committed
DrawingArea.add_artist do not update artist's transform if already set
1 parent 5fd689b commit 1b17994

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

lib/matplotlib/offsetbox.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -491,7 +491,8 @@ def get_extent(self, renderer):
491491
def add_artist(self, a):
492492
'Add any :class:`~matplotlib.artist.Artist` to the container box'
493493
self._children.append(a)
494-
a.set_transform(self.get_transform())
494+
if not a.is_transform_set():
495+
a.set_transform(self.get_transform())
495496

496497

497498
def draw(self, renderer):

0 commit comments

Comments
 (0)