graphinglib.FitFromFOTF.create_slice_x#

FitFromFOTF.create_slice_x(x1: float, x2: float, label: str | None = None, color: str = 'default', line_width: float | Literal['default'] = 'default', line_style: str = 'default', copy_first: bool = False) Self#

Creates a slice of the curve between two x values.

Parameters:
x1, x2float

The x 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_style configuration.

line_widthfloat

Width of the slice. Default depends on the figure_style configuration.

line_stylestr

Style of the slice. Default depends on the figure_style configuration.

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. If False, a new curve will be created with the slicing applied and the parameters passed to this method.

Returns:
A Curve object which is the slice of the original curve between the two x values.