text_wrapper¶
-
text_wrapper(self, func, x=0, y=0, text='', transform='data', fontfamily=None, fontname=None, fontsize=None, size=None, border=False, bordercolor='w', invert=False, lw=None, linewidth=2, **kwargs)[source]¶ Wraps
text, and enables specifyingtranformwith a string name and adds feature for drawing borders around text.- Parameters
x, y (float) – The x and y coordinates for the text.
text (str) – The text string.
transform ({‘data’, ‘axes’, ‘figure’} or
Transform, optional) – The transform used to interpretxandy. Can be aTransformobject or a string representing thetransData,transAxes, ortransFiguretransforms. Default is'data', i.e. the text is positioned in data coordinates.size, fontsize (float or str, optional) – The font size. If float, units are inches. If string, units are interpreted by
units.fontname, fontfamily (str, optional) – Aliases for the
fontfamilyTextproperty.border (bool, optional) – Whether to draw border around text.
bordercolor (color-spec, optional) – The color of the border. Default is
'w'.invert (bool, optional) – If
False,'color'is used for the text andbordercolorfor the border. IfTrue, this is inverted.lw, linewidth (float, optional) – Ignored if
borderisFalse. The width of the text border.
- Other Parameters
**kwargs – Passed to
Textinstantiator.