matplotlib.patches.StepPatch#
- class matplotlib.patches.StepPatch(values, edges, *, orientation='vertical', baseline=0, **kwargs)[source]#
Bases:
PathPatch
A path patch describing a stepwise constant function.
By default the path is not closed and starts and stops at baseline value.
- Parameters:
- valuesarray-like
The step heights.
- edgesarray-like
The edge positions, with
len(edges) == len(vals) + 1
, between which the curve takes on vals values.- orientation{'vertical', 'horizontal'}, default: 'vertical'
The direction of the steps. Vertical means that values are along the y-axis, and edges are along the x-axis.
- baselinefloat, array-like or None, default: 0
The bottom value of the bounding edges or when
fill=True
, position of lower edge. If fill is True or an array is passed to baseline, a closed path is drawn.- Other valid keyword arguments are:
Property
Description
a filter function, which takes a (m, n, 3) float array and a dpi value, and returns a (m, n, 3) array and two offsets from the bottom left corner of the image
unknown
bool
antialiased
or aabool or None
CapStyle
or {'butt', 'projecting', 'round'}bool
Patch or (Path, Transform) or None
color
edgecolor
or eccolor or None
facecolor
or fccolor or None
bool
str
{'/', '\', '|', '-', '+', 'x', 'o', 'O', '.', '*'}
bool
JoinStyle
or {'miter', 'round', 'bevel'}object
linestyle
or ls{'-', '--', '-.', ':', '', (offset, on-off-seq), ...}
linewidth
or lwfloat or None
bool
None or bool or float or callable
bool
(scale: float, length: float, randomness: float)
bool or None
str
bool
float
- set(*, agg_filter=<UNSET>, alpha=<UNSET>, animated=<UNSET>, antialiased=<UNSET>, capstyle=<UNSET>, clip_box=<UNSET>, clip_on=<UNSET>, clip_path=<UNSET>, color=<UNSET>, data=<UNSET>, edgecolor=<UNSET>, facecolor=<UNSET>, fill=<UNSET>, gid=<UNSET>, hatch=<UNSET>, in_layout=<UNSET>, joinstyle=<UNSET>, label=<UNSET>, linestyle=<UNSET>, linewidth=<UNSET>, mouseover=<UNSET>, path=<UNSET>, path_effects=<UNSET>, picker=<UNSET>, rasterized=<UNSET>, sketch_params=<UNSET>, snap=<UNSET>, transform=<UNSET>, url=<UNSET>, visible=<UNSET>, zorder=<UNSET>)[source]#
Set multiple properties at once.
Supported properties are
Property
Description
a filter function, which takes a (m, n, 3) float array and a dpi value, and returns a (m, n, 3) array and two offsets from the bottom left corner of the image
scalar or None
bool
antialiased
or aabool or None
CapStyle
or {'butt', 'projecting', 'round'}bool
Patch or (Path, Transform) or None
color
1D array-like or None
edgecolor
or eccolor or None
facecolor
or fccolor or None
bool
str
{'/', '\', '|', '-', '+', 'x', 'o', 'O', '.', '*'}
bool
JoinStyle
or {'miter', 'round', 'bevel'}object
linestyle
or ls{'-', '--', '-.', ':', '', (offset, on-off-seq), ...}
linewidth
or lwfloat or None
bool
unknown
None or bool or float or callable
bool
(scale: float, length: float, randomness: float)
bool or None
str
bool
float