pytools.viz.util.FittedText#
- class pytools.viz.util.FittedText(*, x=0, y=0, width=None, height=None, text='', **kwargs)[source]#
Handle storing and drawing of text in window or data coordinates; only render text that does not exceed the given width and height in data coordinates.
- Bases
- Parameters
width (
Union
[int
,float
,None
]) – the maximum allowed width for this text, in data coordinates; ifNone
, width is unrestrictedheight (
Union
[int
,float
,None
]) – the maximum allowed height for this text, in data coordinates; ifNone
, height is unrestrictedtext (
str
) – the text to be renderedkwargs (
Any
) – additional keyword arguments of classmatplotlib.text.Text
Method summary
Draw the text if it is visible, and if it does not exceed the maximum width and height.
Get the maximum allowed height for this text, in data coordinates.
get_path_effects
See
matplotlib.artist.Artist.get_transformed_clip_path_and_affine()
Get the maximum allowed width for this text, in data coordinates.
Set multiple properties.
Set the maximum allowed height for this text, in data coordinates.
Set the maximum allowed width for this text, in data coordinates.
Attribute summary
zorder
Definitions
- add_callback(func)#
- contains(mouseevent)#
- convert_xunits(x)#
- convert_yunits(y)#
- draw(renderer)[source]#
Draw the text if it is visible, and if it does not exceed the maximum width and height.
See also
draw()
.- Parameters
renderer (
RendererBase
) – the renderer used for drawing- Return type
- findobj(match=None, include_self=True)#
- format_cursor_data(data)#
- get_agg_filter()#
- get_alpha()#
- get_animated()#
- get_antialiased()#
- get_bbox_patch()#
- get_c()#
- get_children()#
- get_clip_box()#
- get_clip_on()#
- get_clip_path()#
- get_color()#
- get_cursor_data(event)#
- get_family()#
- get_figure()#
- get_font()#
- get_font_properties()#
- get_fontfamily()#
- get_fontname()#
- get_fontproperties()#
- get_fontsize()#
- get_fontstyle()#
- get_fontvariant()#
- get_fontweight()#
- get_gid()#
- get_ha()#
- get_horizontalalignment()#
- get_in_layout()#
- get_label()#
- get_math_fontfamily()#
- get_mouseover()#
- get_name()#
- get_parse_math()#
- get_picker()#
- get_position()#
- get_rasterized()#
- get_rotation()#
- get_rotation_mode()#
- get_size()#
- get_sketch_params()#
- get_snap()#
- get_stretch()#
- get_style()#
- get_text()#
- get_tightbbox(renderer=None)#
- get_transform()#
- get_transform_rotates_text()#
- get_transformed_clip_path_and_affine()#
See
matplotlib.artist.Artist.get_transformed_clip_path_and_affine()
- get_unitless_position()#
- get_url()#
- get_usetex()#
- get_va()#
- get_variant()#
- get_verticalalignment()#
- get_visible()#
- get_weight()#
- get_window_extent(renderer=None, dpi=None)#
- get_wrap()#
- get_zorder()#
- have_units()#
- is_transform_set()#
- pchanged()#
- pick(mouseevent)#
- pickable()#
- properties()#
- remove()#
- remove_callback(oid)#
- set_agg_filter(filter_func)#
- set_alpha(alpha)#
- set_animated(b)#
- set_antialiased(antialiased)#
- set_backgroundcolor(color)#
- set_bbox(rectprops)#
- set_c(color)#
- set_clip_box(clipbox)#
- set_clip_on(b)#
- set_clip_path(path, transform=None)#
- set_color(color)#
- set_family(fontname)#
- set_figure(fig)#
- set_font(fp)#
- set_font_properties(fp)#
- set_fontfamily(fontname)#
- set_fontname(fontname)#
- set_fontproperties(fp)#
- set_fontsize(fontsize)#
- set_fontstretch(stretch)#
- set_fontstyle(fontstyle)#
- set_fontvariant(variant)#
- set_fontweight(weight)#
- set_gid(gid)#
- set_ha(align)#
- set_horizontalalignment(align)#
- set_in_layout(in_layout)#
- set_label(s)#
- set_linespacing(spacing)#
- set_ma(align)#
- set_math_fontfamily(fontfamily)#
- set_mouseover(mouseover)#
- set_multialignment(align)#
- set_name(fontname)#
- set_parse_math(parse_math)#
- set_path_effects(path_effects)#
- set_picker(picker)#
- set_position(xy)#
- set_rasterized(rasterized)#
- set_rotation(s)#
- set_rotation_mode(m)#
- set_size(fontsize)#
- set_sketch_params(scale=None, length=None, randomness=None)#
- set_snap(snap)#
- set_stretch(stretch)#
- set_style(fontstyle)#
- set_text(s)#
- set_transform(t)#
- set_transform_rotates_text(t)#
- set_url(url)#
- set_usetex(usetex)#
- set_va(align)#
- set_variant(variant)#
- set_verticalalignment(align)#
- set_visible(b)#
- set_weight(weight)#
- set_wrap(wrap)#
- set_x(x)#
- set_y(y)#
- set_zorder(level)#
- update(kwargs)#
- update_bbox_position_size(renderer)#
- update_from(other)#
- property axes#
- property mouseover#
- property stale#
- property sticky_edges#