FillBetweenItem#
- class pyqtgraph.FillBetweenItem(
- curve1: PlotDataItem | PlotCurveItem,
- curve2: PlotDataItem | PlotCurveItem,
- brush=None,
- pen=None,
- fillRule: FillRule = FillRule.OddEvenFill,
GraphicsItem filling the space between two PlotDataItems.
- __init__(
- curve1: PlotDataItem | PlotCurveItem,
- curve2: PlotDataItem | PlotCurveItem,
- brush=None,
- pen=None,
- fillRule: FillRule = FillRule.OddEvenFill,
FillBetweenItem fills a region between two curves with a specified
QBrush
.- Parameters:
curve1 (
PlotDataItem
|PlotCurveItem
) – Line to draw fill fromcurve2 (
PlotDataItem
|PlotCurveItem
) – Line to draw fill tobrush (
color_like
, optional) – Arguments accepted bymkBrush()
, used to create theQBrush
instance used to draw the item by default Nonepen (
color_like
, optional) – Arguments accepted bymkColor()
, used to create theQPen
instance used to draw the item by defaultNone
fillRule (
FillRule
, optional) – FillRule to be applied to the underlyingQPainterPath
instance, by defaultQtCore.Qt.FillRule.OddEvenFill
- Raises:
ValueError – Raised when
None
is passed in as eithercurve1
orcurve2
TypeError – Raised when either
curve1
orcurve2
is not eitherPlotDataItem
orPlotCurveItem
- setCurves(
- curve1: PlotDataItem | PlotCurveItem,
- curve2: PlotDataItem | PlotCurveItem,
Method to set the Curves to draw the FillBetweenItem between
- Parameters:
curve1 (
PlotDataItem
|PlotCurveItem
) – Line to draw fill fromcurve2 (
PlotDataItem
|PlotCurveItem
) – Line to draw fill to
- Raises:
TypeError – Raised when input arguments are not either
PlotDataItem
orPlotCurveItem
- setFillRule(
- fillRule: FillRule = FillRule.OddEvenFill,
Set the underlying
QPainterPath
to the specifiedFillRule
This can be useful for allowing in the filling of voids.