@@ -46,8 +46,7 @@ def _process_text_args(override, fontdict=None, **kwargs):
46
46
47
47
@contextlib .contextmanager
48
48
def _wrap_text (textobj ):
49
- """
50
- Temporarily inserts newlines to the text if the wrap option is enabled.
49
+ """Temporarily inserts newlines to the text if the wrap option is enabled.
51
50
"""
52
51
if textobj .get_wrap ():
53
52
old_text = textobj .get_text ()
@@ -82,62 +81,6 @@ def get_rotation(rotation):
82
81
"None" .format (rotation ))
83
82
84
83
return angle % 360
85
- # these are not available for the object inspector until after the
86
- # class is build so we define an initial set here for the init
87
- # function and they will be overridden after object defn
88
- docstring .interpd .update (Text = """
89
- ========================== ================================================
90
- Property Value
91
- ========================== ================================================
92
- alpha float or None
93
- animated [True | False]
94
- backgroundcolor any matplotlib color
95
- bbox rectangle prop dict plus key 'pad' which is a
96
- pad in points; if a boxstyle is supplied as
97
- a string, then pad is instead a fraction
98
- of the font size
99
- clip_box a matplotlib.transform.Bbox instance
100
- clip_on [True | False]
101
- color any matplotlib color
102
- family ['serif' | 'sans-serif' | 'cursive' |
103
- 'fantasy' | 'monospace']
104
- figure a matplotlib.figure.Figure instance
105
- fontproperties a matplotlib.font_manager.FontProperties
106
- 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 e.g.,
113
- ['Sans' | 'Courier' | 'Helvetica' ...]
114
- position (x,y)
115
- rotation [ angle in degrees 'vertical' | 'horizontal'
116
- rotation_mode [ None | 'anchor']
117
- size or fontsize [size in points | relative size e.g., 'smaller',
118
- 'x-large']
119
- style or fontstyle [ 'normal' | 'italic' | 'oblique']
120
- text string
121
- transform a matplotlib.transform transformation instance
122
- usetex [True | False | None]
123
- variant ['normal' | 'small-caps']
124
- verticalalignment or va ['center' | 'top' | 'bottom' | 'baseline' |
125
- 'center_baseline' ]
126
- visible [True | False]
127
- weight or fontweight ['normal' | 'bold' | 'heavy' | 'light' |
128
- 'ultrabold' | 'ultralight']
129
- wrap [True | False]
130
- x float
131
- y float
132
- zorder any number
133
- ========================== ===============================================
134
- """ )
135
-
136
- # TODO : This function may move into the Text class as a method. As a
137
- # matter of fact, The information from the _get_textbox function
138
- # should be available during the Text._get_layout() call, which is
139
- # called within the _get_textbox. So, it would better to move this
140
- # function as a method with some refactoring of _get_layout method.
141
84
142
85
143
86
def _get_textbox (text , renderer ):
@@ -146,6 +89,11 @@ def _get_textbox(text, renderer):
146
89
:meth:`matplotlib.text.Text.get_extents` method, The bbox size of
147
90
the text before the rotation is calculated.
148
91
"""
92
+ # TODO : This function may move into the Text class as a method. As a
93
+ # matter of fact, The information from the _get_textbox function
94
+ # should be available during the Text._get_layout() call, which is
95
+ # called within the _get_textbox. So, it would better to move this
96
+ # function as a method with some refactoring of _get_layout method.
149
97
150
98
projected_xs = []
151
99
projected_ys = []
0 commit comments