graphinglib.Line#
- class graphinglib.Line(pointA: tuple[float, float], pointB: tuple[float, float], color: str | Inherit = Inherit, width: float | Inherit = Inherit, capped_line: bool = False, cap_width: float | Inherit = Inherit, alpha: float | Inherit = Inherit)[source]#
This class implements a line object.
- Parameters:
- pointAtuple[float, float]
Point A of the line.
- pointBtuple[float, float]
Point B of the line.
- colorstr
Color of the line. Default depends on the
figure_styleconfiguration.- widthfloat, optional
Line width. Typical range is
0.5to4. Default depends on thefigure_styleconfiguration.- capped_linebool
If
True, the line is capped on both ends. Defaults toFalse.- cap_widthfloat
Width of the caps. Typical range is
0.5to4. Default depends on thefigure_styleconfiguration.- alphafloat
Opacity of the line. Range is
0(transparent) to1(opaque). Default depends on thefigure_styleconfiguration.
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 between0and1((0, 0, 1)or(0, 0, 1, 0.5)).Methods