@@ -94,36 +94,36 @@ def get_rotation(rotation):
9494# class is build so we define an initial set here for the init
9595# function and they will be overridden after object defn
9696artist .kwdocd ['Text' ] = """\
97- alpha: float
98- animated: [True | False]
99- backgroundcolor: any matplotlib color
100- bbox: rectangle prop dict plus key 'pad' which is a pad in points
101- clip_box: a matplotlib.transform.Bbox instance
102- clip_on: [True | False]
103- color: any matplotlib color
104- family: [ 'serif' | 'sans-serif' | 'cursive' | 'fantasy' | 'monospace' ]
105- figure: a matplotlib.figure.Figure instance
106- fontproperties: a matplotlib.font_manager.FontProperties instance
107- horizontalalignment or ha: [ 'center' | 'right' | 'left' ]
108- label: any string
109- linespacing: float
110- lod: [True | False]
111- multialignment: ['left' | 'right' | 'center' ]
112- name or fontname: string eg, ['Sans' | 'Courier' | 'Helvetica' ...]
113- position: (x,y)
114- rotation: [ angle in degrees 'vertical' | 'horizontal'
115- size or fontsize: [ size in points | relative size eg 'smaller', 'x-large' ]
116- style or fontstyle: [ 'normal' | 'italic' | 'oblique']
117- text: string
118- transform: a matplotlib.transform transformation instance
119- variant: [ 'normal' | 'small-caps' ]
120- verticalalignment or va: [ 'center' | 'top' | 'bottom' ]
121- visible: [True | False]
122- weight or fontweight: [ 'normal' | 'bold' | 'heavy' | 'light' | 'ultrabold' | 'ultralight']
123- x: float
124- y: float
125- zorder: any number
126- """
97+ alpha: float
98+ animated: [True | False]
99+ backgroundcolor: any matplotlib color
100+ bbox: rectangle prop dict plus key 'pad' which is a pad in points
101+ clip_box: a matplotlib.transform.Bbox instance
102+ clip_on: [True | False]
103+ color: any matplotlib color
104+ family: [ 'serif' | 'sans-serif' | 'cursive' | 'fantasy' | 'monospace' ]
105+ figure: a matplotlib.figure.Figure instance
106+ fontproperties: a matplotlib.font_manager.FontProperties instance
107+ horizontalalignment or ha: [ 'center' | 'right' | 'left' ]
108+ label: any string
109+ linespacing: float
110+ lod: [True | False]
111+ multialignment: ['left' | 'right' | 'center' ]
112+ name or fontname: string eg, ['Sans' | 'Courier' | 'Helvetica' ...]
113+ position: (x,y)
114+ rotation: [ angle in degrees 'vertical' | 'horizontal'
115+ size or fontsize: [ size in points | relative size eg 'smaller', 'x-large' ]
116+ style or fontstyle: [ 'normal' | 'italic' | 'oblique']
117+ text: string
118+ transform: a matplotlib.transform transformation instance
119+ variant: [ 'normal' | 'small-caps' ]
120+ verticalalignment or va: [ 'center' | 'top' | 'bottom' ]
121+ visible: [True | False]
122+ weight or fontweight: [ 'normal' | 'bold' | 'heavy' | 'light' | 'ultrabold' | 'ultralight']
123+ x: float
124+ y: float
125+ zorder: any number
126+ """
127127
128128class Text (Artist ):
129129 """
@@ -149,8 +149,10 @@ def __init__(self,
149149 ** kwargs
150150 ):
151151 """
152- Create a Text instance at x,y with string text. Valid kwargs are
153- %(Text)s
152+ Create a Text instance at x,y with string text.
153+
154+ Valid kwargs are
155+ %(Text)s
154156 """
155157
156158 Artist .__init__ (self )
@@ -817,6 +819,7 @@ def _get_layout_super(self, renderer, m):
817819
818820 return val
819821
822+ artist .kwdocd ['Text' ] = artist .kwdoc (Text )
820823
821824
822825class TextWithDash (Text ):
@@ -1125,6 +1128,7 @@ def set_figure(self, fig):
11251128 Text .set_figure (self , fig )
11261129 self .dashline .set_figure (fig )
11271130
1131+ artist .kwdocd ['TextWithDash' ] = artist .kwdoc (TextWithDash )
11281132
11291133class Annotation (Text ):
11301134 """
@@ -1134,8 +1138,8 @@ class Annotation(Text):
11341138 def __str__ (self ):
11351139 return "Annotation(%g,%g,%s)" % (self .xy [0 ],self .xy [1 ],self ._text )
11361140 def __init__ (self , s , xy ,
1137- xycoords = 'data' ,
11381141 xytext = None ,
1142+ xycoords = 'data' ,
11391143 textcoords = None ,
11401144 arrowprops = None ,
11411145 ** kwargs ):
@@ -1159,7 +1163,7 @@ def __init__(self, s, xy,
11591163 endpoints. ie, shrink=0.05 is 5%%
11601164 - any key for matplotlib.patches.polygon
11611165
1162- xycoords and textcoords are a string that indicates the
1166+ xycoords and textcoords are strings that indicate the
11631167 coordinates of xy and xytext.
11641168
11651169 'figure points' : points from the lower left corner of the figure
@@ -1184,7 +1188,7 @@ def __init__(self, s, xy,
11841188
11851189 Additional kwargs are Text properties:
11861190
1187- %(Text)s
1191+ %(Text)s
11881192
11891193 """
11901194 if xytext is None :
@@ -1344,6 +1348,4 @@ def draw(self, renderer):
13441348 Text .draw (self , renderer )
13451349
13461350
1347- artist .kwdocd ['Text' ] = artist .kwdoc (Text )
1348- artist .kwdocd ['TextWithDash' ] = artist .kwdoc (TextWithDash )
1349- artist .kwdocd ['Annotation' ] = artist .kwdoc (Annotation )
1351+ artist .kwdocd ['Annotation' ] = Annotation .__init__ .__doc__
0 commit comments