@@ -703,30 +703,26 @@ class TextArea(OffsetBox):
703
703
@cbook ._delete_parameter ("3.4" , "minimumdescent" )
704
704
def __init__ (self , s ,
705
705
textprops = None ,
706
- multilinebaseline = None ,
706
+ multilinebaseline = False ,
707
707
minimumdescent = True ,
708
708
):
709
709
"""
710
710
Parameters
711
711
----------
712
712
s : str
713
713
The text to be displayed.
714
-
715
- textprops : dict, optional
716
- Dictionary of keyword parameters to be passed to the
717
- `~matplotlib.text.Text` instance contained inside TextArea.
718
-
719
- multilinebaseline : bool, optional
720
- If `True`, baseline for multiline text is adjusted so that it is
721
- (approximately) center-aligned with singleline text.
722
-
714
+ textprops : dict, default: {}
715
+ Dictionary of keyword parameters to be passed to the `.Text`
716
+ instance in the TextArea.
717
+ multilinebaseline : bool, default: False
718
+ Whether the baseline for multiline text is adjusted so that it
719
+ is (approximately) center-aligned with single-line text.
723
720
minimumdescent : bool, default: True
724
721
If `True`, the box has a minimum descent of "p". This is now
725
722
effectively always True.
726
723
"""
727
724
if textprops is None :
728
725
textprops = {}
729
- textprops .setdefault ("va" , "baseline" )
730
726
self ._text = mtext .Text (0 , 0 , s , ** textprops )
731
727
super ().__init__ ()
732
728
self ._children = [self ._text ]
@@ -750,8 +746,10 @@ def set_multilinebaseline(self, t):
750
746
"""
751
747
Set multilinebaseline.
752
748
753
- If True, baseline for multiline text is adjusted so that it is
754
- (approximately) center-aligned with single-line text.
749
+ If True, the baseline for multiline text is adjusted so that it is
750
+ (approximately) center-aligned with single-line text. This is used
751
+ e.g. by the legend implementation so that single-line labels are
752
+ baseline-aligned, but multiline labels are "center"-aligned with them.
755
753
"""
756
754
self ._multilinebaseline = t
757
755
self .stale = True
0 commit comments