matplotlib.pyplot.hlines
- matplotlib.pyplot. hlines ( y, xmin, xmax, colors=None, linestyles='solid', label='', *, data=None, **kwargs ) [source]
-
Plot horizontal lines at each y from xmin to xmax.
- Parameters
-
- y float or array-like
-
y-indexes where to plot the lines.
- xmin, xmax float or array-like
-
Respective beginning and end of each line. If scalars are provided, all lines will have same length.
-
colors
list of colors, default:
rcParams["lines.color"]
(default:'C0'
) - linestyles {'solid', 'dashed', 'dashdot', 'dotted'}, optional
- label str, default: ''
- Returns
- Other Parameters
-
- data indexable object, optional
-
If given, the following parameters also accept a string
s
, which is interpreted asdata[s]
(unless this raises an exception):y, xmin, xmax, colors
-
**kwargs
LineCollection
properties.
© 2012–2021 Matplotlib Development Team. All rights reserved.
Licensed under the Matplotlib License Agreement.
https://matplotlib.org/3.5.1/api/_as_gen/matplotlib.pyplot.hlines.html