Axes.text¶
- Axes.text(**kwargs)[source]¶
Add text to the axes.
- Parameters
x, y, [z] (
float) – The coordinates for the text.ThreeAxesaccept an optional third coordinate. If only two are provided this automatically redirects to thetext2Dmethod.s, text (
str) – The string for the text.transform (
{'data', 'axes', 'figure', 'subfigure'}orTransform, optional) – The transform used to interpret the bounds. Can be aTransforminstance or a string representing thetransData,transAxes,transFigure, ortransSubfigure, transforms.
- Other Parameters
border (
bool, default:False) – Whether to draw border around text.borderwidth (
float, default:2) – The width of the text border.bordercolor (
color-spec, default:'w') – The color of the text border.borderinvert (
bool, optional) – IfTrue, the text and border colors are swapped.borderstyle (
{'miter', 'round', 'bevel'}, optional) – The line join style used for the border.bbox (
bool, default:False) – Whether to draw a bounding box around text.bboxcolor (
color-spec, default:'w') – The color of the text bounding box.bboxstyle (
boxstyle, default:'round') – The style of the bounding box.bboxalpha (
float, default:0.5) – The alpha for the bounding box.bboxpad (
float, default:rc['title.bboxpad']=None) – The padding for the bounding box.name, fontname, family, fontfamily (
str, optional) – The font typeface name (e.g.,'Fira Math') or font family name (e.g.,'serif'). Matplotlib falls back to the system default if not found.size, fontsize (
unit-specorstr, optional) – The font size. If float, units are points. If string, interpreted byunits. This can also be a string indicating some scaling relative torc['font.size']. The sizes and scalings are shown below. The scalings'med','med-small', and'med-large'are added by proplot while the rest are native matplotlib sizes.Size
Scale
'xx-small'0.579
'x-small'0.694
'small','smaller'0.833
'med-small'0.9
'med','medium'1.0
'med-large'1.1
'large','larger'1.2
'x-large'1.440
'xx-large'1.728
'larger'1.2
**kwargs – Passed to
matplotlib.axes.Axes.text.
See also