Plot a horizontal sequence of rectangles.
A rectangle is drawn for each element of xranges. All rectangles have the same vertical position and size defined by yrange.
This is a convenience function for instantiating a BrokenBarHCollection
, adding it to the Axes and autoscaling the view.
The x-positions and extends of the rectangles. For each tuple (xmin, xwidth) a rectangle is drawn from xmin to xmin + xwidth.
The y-position and extend for all the rectangles.
If given, all parameters also accept a string s
, which is interpreted as data[s]
(unless this raises an exception).
BrokenBarHCollection
properties
Each kwarg can be either a single argument applying to all rectangles, e.g.:
facecolors='black'
or a sequence of arguments over which is cycled, e.g.:
facecolors=('black', 'blue')
would create interleaving black and blue rectangles.
Supported keywords:
Property | Description |
---|---|
a filter function, which takes a (m, n, 3) float array and a dpi value, and returns a (m, n, 3) array | |
array-like or scalar or None | |
bool | |
| bool or list of bools |
array-like or None | |
| |
(vmin: float, vmax: float) | |
bool | |
Patch or (Path, Transform) or None | |
| |
color or list of rgba tuples | |
| color or list of colors or 'face' |
| color or list of colors |
str | |
{'/', '\', '|', '-', '+', 'x', 'o', 'O', '.', '*'} | |
bool | |
| |
object | |
| str or tuple or list thereof |
| float or list of floats |
| |
(N, 2) or (2,) array-like | |
list of array-like | |
None or bool or float or callable | |
float | |
bool | |
| ndarray or None |
(scale: float, length: float, randomness: float) | |
bool or None | |
str | |
list of str or None | |
list of array-like | |
unknown | |
bool | |
float |
matplotlib.axes.Axes.broken_barh
© 2012–2021 Matplotlib Development Team. All rights reserved.
Licensed under the Matplotlib License Agreement.
https://matplotlib.org/3.5.1/api/_as_gen/matplotlib.axes.Axes.broken_barh.html