@@ -201,7 +201,7 @@ def _get_aligned_offsets(yspans, height, align="baseline"):
201
201
202
202
class OffsetBox (martist .Artist ):
203
203
"""
204
- The OffsetBox is a simple container artist.
204
+ A simple container artist.
205
205
206
206
The child artists are meant to be drawn at a relative position to its
207
207
parent.
@@ -826,17 +826,18 @@ def draw(self, renderer):
826
826
827
827
class AuxTransformBox (OffsetBox ):
828
828
"""
829
- Offset Box with the aux_transform. Its children will be
830
- transformed with the aux_transform first then will be
831
- offsetted. The absolute coordinate of the aux_transform is meaning
832
- as it will be automatically adjust so that the left-lower corner
833
- of the bounding box of children will be set to (0, 0) before the
834
- offset transform.
835
-
836
- It is similar to drawing area, except that the extent of the box
837
- is not predetermined but calculated from the window extent of its
838
- children. Furthermore, the extent of the children will be
839
- calculated in the transformed coordinate.
829
+ An OffsetBox with an auxiliary transform.
830
+
831
+ All child artists are first transformed with *aux_transform*, then
832
+ translated with an offset (the same for all children) so the bounding
833
+ box of the children matches the drawn box. (In other words, adding an
834
+ arbitrary translation to *aux_transform* has no effect as it will be
835
+ cancelled out by the later offsetting.)
836
+
837
+ `AuxTransformBox` is similar to `.DrawingArea`, except that the extent of
838
+ the box is not predetermined but calculated from the window extent of its
839
+ children, and the extent of the children will be calculated in the
840
+ transformed coordinate.
840
841
"""
841
842
def __init__ (self , aux_transform ):
842
843
self .aux_transform = aux_transform
@@ -853,10 +854,7 @@ def add_artist(self, a):
853
854
self .stale = True
854
855
855
856
def get_transform (self ):
856
- """
857
- Return the :class:`~matplotlib.transforms.Transform` applied
858
- to the children
859
- """
857
+ """Return the `.Transform` applied to the children."""
860
858
return (self .aux_transform
861
859
+ self .ref_offset_transform
862
860
+ self .offset_transform )
@@ -908,7 +906,7 @@ def draw(self, renderer):
908
906
909
907
class AnchoredOffsetbox (OffsetBox ):
910
908
"""
911
- An offset box placed according to location *loc*.
909
+ An OffsetBox placed according to location *loc*.
912
910
913
911
AnchoredOffsetbox has a single child. When multiple children are needed,
914
912
use an extra OffsetBox to enclose them. By default, the offset box is
0 commit comments