Skip to content

Commit 0d1f343

Browse files
committed
DOC: annotation tightbbox API change
1 parent 062d54a commit 0d1f343

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
Annotations with ``annotation_clip`` no longer affect ``tight_layout``
2+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
3+
Previously, `.text.Annotation.get_tightbbox` always returned the full
4+
`.text.Annotation.get_window_extent` of the object, independent of the value
5+
of ``annotation_clip``. `.text.Annotation.get_tightbbox` now correctly takes
6+
this extra clipping box into account, meaning that `~.text.Annotation`\s that
7+
are not drawn because of ``annotation_clip`` will not count towards the axes
8+
bounding box calculations, such as those done by `~.pyplot.tight_layout`.
9+
10+
This is now consistent with the API described in `~.artist.Artist`, which
11+
specifies that ``get_window_extent`` should return the full extents and
12+
``get_tightbbox`` should "account for any clipping".

0 commit comments

Comments
 (0)