Skip to content

Commit 94ea8a4

Browse files
committed
Clarify FigureBase.tight_bbox as different from all other artists.
It explicitly scales the union of child tightbboxes by 1/dpi, i.e. converts from pixels to inches. Perhaps that's not the most elegant design, but let's make that behavior clear.
1 parent 07a0444 commit 94ea8a4

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

lib/matplotlib/figure.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1596,7 +1596,10 @@ def get_default_bbox_extra_artists(self):
15961596

15971597
def get_tightbbox(self, renderer, bbox_extra_artists=None):
15981598
"""
1599-
Return a (tight) bounding box of the figure in inches.
1599+
Return a (tight) bounding box of the figure *in inches*.
1600+
1601+
Note that `.FigureBase` differs from all other artists, which return
1602+
their `.Bbox` in pixels.
16001603
16011604
Artists that have ``artist.set_in_layout(False)`` are not included
16021605
in the bbox.

0 commit comments

Comments
 (0)