graphinglib.Vlines#

class graphinglib.Vlines(x: ArrayLike, y_min: TypeAliasForwardRef('ArrayLike') | None = None, y_max: TypeAliasForwardRef('ArrayLike') | None = None, label: str | None = None, colors: list[str] | str | Inherit = Inherit, line_widths: list[float] | float | Inherit = Inherit, line_styles: list[str] | str | Inherit = Inherit, alpha: float | Inherit = Inherit)[source]#

This class implements simple vertical lines.

Parameters:
xArrayLike

Horizontal positions at which the lines should be plotted.

y_minArrayLike, optional

Vertical start position of the lines. Each line can have a different start. If not specified, lines will span the entire axes. Defaults to None.

y_maxArrayLike, optional

Vertical end position of the lines. Each line can habe a different end. If not specified, lines will span the entire axes. Defaults to None.

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. Typical range is 0.5 to 4. 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. Values include "-", "--", "-.", ":", "solid", "dashed", "dashdot", and "dotted". Default depends on the figure_style configuration.

alphafloat

Opacity of the lines. Range is 0 (transparent) to 1 (opaque). Default depends on the figure_style configuration.

Notes

Color parameters accept Matplotlib color formats: named colors ("blue"), short color strings ("b"), hex strings ("#0000ff"), grayscale strings ("0.5"), and RGB/RGBA tuples with values between 0 and 1 ((0, 0, 1) or (0, 0, 1, 0.5)).

Methods

__init__(x[, y_min, y_max, label, colors, ...])

copy()

Returns a deep copy of the Vlines object.

copy_with(**kwargs)

Returns a deep copy of the Plottable with specified attributes overridden.