graphinglib.FitFromFOTF.create_slice_y#
- FitFromFOTF.create_slice_y(y1: float, y2: float, label: str | None = None, color: str | Inherit = Inherit, line_width: float | Inherit = Inherit, line_style: str | Inherit = Inherit, alpha: float | Inherit = Inherit, copy_first: bool = False) Self#
Creates a slice of the curve between two y values.
- Parameters:
- y1, y2float
The y values between which the slice is to be created.
- labelstr, optional
Label of the slice to be displayed in the legend.
- colorstr
Color of the slice. Default depends on the
figure_styleconfiguration.- line_widthfloat
Width of the slice. Typical range is
0.5to4. Default depends on thefigure_styleconfiguration.- line_stylestr
Style of the slice. Values include
"-","--","-.",":","solid","dashed","dashdot", and"dotted". Default depends on thefigure_styleconfiguration.- alphafloat
Opacity of the slice. Range is
0(transparent) to1(opaque). Default depends on thefigure_styleconfiguration.- copy_firstbool
If
True, a copy of the curve (with all its parameters) will be returned with the slicing applied. Any other parameters passed to this method will also be applied to the copied curve. IfFalse, a new curve will be created with the slicing applied and the parameters passed to this method.
- Returns:
- A
Curveobject which is the slice of the original curve between the two y - values.
- A
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)).