|
Methods defined here:
- __init__(self, x=0, y=0, text='', color=None, verticalalignment='bottom', horizontalalignment='left', multialignment=None, fontproperties=None, rotation=None)
- copy_properties(self, t)
- Copy properties from t to self
- draw(self, renderer)
- get_color(self)
- Return the color of the text
- get_font_properties(self)
- Return the font object
- get_fontname(self)
- alias for get_name
- get_fontsize(self)
- alias for get_size
- get_fontstyle(self)
- alias for get_style
- get_fontweight(self)
- alias for get_weight
- get_ha(self)
- alias for get_horizontalalignment
- get_horizontalalignment(self)
- Return the horizontal alignment as string
- get_name(self)
- Return the font name as string
- get_position(self)
- Return x, y as tuple
- get_prop_tup(self)
- Return a hashable tuple of properties
Not intended to be human readable, but useful for backends who
want to cache derived information about text (eg layouts) and
need to know if the text has changed
- get_rotation(self)
- return the text angle as float
- get_rotation_matrix(self, x0, y0)
- get_size(self)
- Return the font size as integer
- get_style(self)
- Return the font style as string
- get_text(self)
- Get the text as string
- get_va(self)
- alias for getverticalalignment
- get_verticalalignment(self)
- Return the vertical alignment as string
- get_weight(self)
- Get the font weight as string
- get_window_extent(self, renderer)
- is_math_text(self)
- set_backgroundcolor(self, color)
- Set the background color of the text
ACCEPTS: any matplotlib color - see help(colors)
- set_bbox(self, rectprops)
- Draw a bounding box around self. rect props are any settable
properties for a rectangle, eg color='r', alpha=0.5
ACCEPTS: rectangle prop dict plus key 'pad' which is a pad in points
- set_color(self, color)
- Set the foreground color of the text
ACCEPTS: any matplotlib color - see help(colors)
- set_family(self, fontname)
- Set the font family
ACCEPTS: [ 'serif' | 'sans-serif' | 'cursive' | 'fantasy' | 'monospace' ]
- set_fontname(self, fontname)
- alias for set_name
- set_fontproperties(self, fp)
- Set the font properties that control the text
ACCEPTS: a matplotlib.font_manager.FontProperties instance
- set_fontsize(self, fontsize)
- alias for set_size
- set_fontstyle(self, fontstyle)
- alias for set_style
- set_fontweight(self, weight)
- alias for set_weight
- set_ha(self, align)
- alias for set_horizontalalignment
- set_horizontalalignment(self, align)
- Set the horizontal alignment to one of
ACCEPTS: [ 'center' | 'right' | 'left' ]
- set_ma(self, align)
- alias for set_verticalalignment
- set_multialignment(self, align)
- Set the alignment for multiple lines layout. The layout of the
bounding box of all the lines is determined bu the horizontalalignment
and verticalalignment properties, but the multiline text within that
box can be
ACCEPTS: ['left' | 'right' | 'center' ]
- set_name(self, fontname)
- Set the font name,
ACCEPTS: string eg, ['Sans' | 'Courier' | 'Helvetica' ...]
- set_position(self, xy)
- Set the xy position of the text
ACCEPTS: (x,y)
- set_rotation(self, s)
- Set the rotation of the text
ACCEPTS: [ angle in degrees 'vertical' | 'horizontal'
- set_size(self, fontsize)
- Set the font size, eg, 8, 10, 12, 14...
ACCEPTS: [ size in points | relative size eg 'smaller', 'x-large' ]
- set_style(self, fontstyle)
- Set the font style
ACCEPTS: [ 'normal' | 'italic' | 'oblique']
- set_text(self, s)
- Set the text string s
ACCEPTS: string
- set_va(self, align)
- alias for set_verticalalignment
- set_variant(self, variant)
- Set the font variant, eg,
ACCEPTS: [ 'normal' | 'small-caps' ]
- set_verticalalignment(self, align)
- Set the vertical alignment
ACCEPTS: [ 'center' | 'top' | 'bottom' ]
- set_weight(self, weight)
- Set the font weight
ACCEPTS: [ 'normal' | 'bold' | 'heavy' | 'light' | 'ultrabold' | 'ultralight']
- set_x(self, x)
- Set the x position of the text
ACCEPTS: float
- set_y(self, y)
- Set the y position of the text
ACCEPTS: float
Data and other attributes defined here:
- zorder = 3
Methods inherited from matplotlib.artist.Artist:
- get_alpha(self)
- Return the alpha value used for blending - not supported on all
backends
- get_clip_on(self)
- Return whether artist uses clipping
- get_figure(self)
- return the figure instance
- get_label(self)
- get_transform(self)
- return the Transformation instance used by this artist
- get_visible(self)
- return the artist's visiblity
- get_zorder(self)
- is_figure_set(self)
- is_transform_set(self)
- Artist has transform explicity let
- set_alpha(self, alpha)
- Set the alpha value used for blending - not supported on
all backends
ACCEPTS: float
- set_clip_box(self, clipbox)
- Set the artist's clip Bbox
ACCEPTS: a matplotlib.transform.Bbox instance
- set_clip_on(self, b)
- Set whether artist uses clipping
ACCEPTS: [True | False]
- set_figure(self, fig)
- Set the figure instance the artist belong to
ACCEPTS: a matplotlib.figure.Figure instance
- set_label(self, s)
- Set the line label to s for auto legend
ACCEPTS: any string
- set_lod(self, on)
- Set Level of Detail on or off. If on, the artists may examine
things like the pixel width of the axes and draw a subset of
their contents accordingly
ACCEPTS: [True | False]
- set_transform(self, t)
- set the Transformation instance used by this artist
ACCEPTS: a matplotlib.transform transformation instance
- set_visible(self, b)
- set the artist's visiblity
ACCEPTS: [True | False]
- set_zorder(self, level)
- Set the zorder for the artist
ACCEPTS: any number
- update(self, props)
Data and other attributes inherited from matplotlib.artist.Artist:
- aname = 'Artist'
|