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

Skip to content

Commit d8e4b95

Browse files
committed
include legends as default_bbox_extra_artists
1 parent 016f245 commit d8e4b95

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

lib/matplotlib/axes.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8269,6 +8269,8 @@ def matshow(self, Z, **kwargs):
82698269

82708270
def get_default_bbox_extra_artists(self, renderer):
82718271
bbox_extra_artists = [t for t in self.texts if t.get_visible()]
8272+
if self.legend_:
8273+
bbox_extra_artists.append(self.legend_)
82728274
return bbox_extra_artists
82738275

82748276

0 commit comments

Comments
 (0)