graphinglib.FitFromSquareRoot.get_area_between#
- FitFromSquareRoot.get_area_between(x1: float, x2: float, fill_between: bool = False, fill_color: str | Inherit = Inherit, other_curve: Self | None = None) float#
Calculates the area between the curve and the x axis between two x values. This is the definite integral of the curve between the two x values.
- Parameters:
- x1, x2float
The x values between which the area is to be calculated.
- fill_betweenbool
Whether to fill the specified area between the curve and the x axis when displaying. Defaults to
False.- fill_colorstr
Color of the area between the curve and the x axis when
fill_betweenis set toTrue."same as curve"uses the curve color. Default depends on thefigure_styleconfiguration.- other_curve
Curve, optional If specified, the area between the two curves will be calculated instead of the area between the curve and the x axis.
- Returns:
- The area (float) between the curve and the x axis (or between the two curves) between the two given x values.
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)).