graphinglib.Text#

class graphinglib.Text(x: float, y: float, text: str, color: str = 'default', font_size: float | Literal['same as figure'] = 'same as figure', h_align: str = 'default', v_align: str = 'default')[source]#

This class allows text to be plotted.

It is also possible to attach an arrow to the Text with the method attach_arrow() to point at something of interest in the plot.

Parameters:
x, yfloat

The x and y coordinates at which to plot the Text.

textstr

The text to be plotted.

colorstr

Color of the text. Default depends on the figure_style configuration.

font_sizefloat

Font size of the text. Default depends on the figure_style configuration.

h_align, v_alignstr

Horizontal and vertical alignment of the text. Default depends on the figure_style configuration.

Methods

__init__(x, y, text[, color, font_size, ...])

This class allows text to be plotted.

add_arrow(points_to[, width, shrink, ...])

Adds an arrow pointing from the Text to a specified point.

copy()

Returns a deep copy of the Text object.