graphinglib.Hlines#

class graphinglib.Hlines(y: ArrayLike, x_min: ArrayLike, x_max: ArrayLike, label: str | None = None, colors: list[str] | str = 'default', line_widths: list[float] | float = 'default', line_styles: list[str] | str = 'default')[source]#

This class implements simple horizontal lines.

Parameters:
yArrayLike

Vertical positions at which the lines should be plotted.

x_min, x_maxArrayLike

Horizontal positions at which the lines should start and end. Different positions can be specified for each line.

labelstr, optional

Label to be displayed in the legend.

colorslist[str]

Colors to use for the lines. One color for every line or a color per line can be specified. Default depends on the figure_style configuration.

line_widthslist[float]

Line widths to use for the lines. One width for every line or a width per line can be specified. Default depends on the figure_style configuration.

line_styleslist[str]

Line styles to use for the lines. One style for every line or a style per line can be specified. Default depends on the figure_style configuration.

Methods

__init__(y, x_min, x_max[, label, colors, ...])

This class implements simple horizontal lines.

copy()

Returns a deep copy of the Hlines object.