matplotlib.pyplot.hlines#
- matplotlib.pyplot.hlines(y,xmin,xmax,colors=None,linestyles='solid',*,label='',data=None,**kwargs)[source]#
Plot horizontal lines at eachy fromxmin toxmax.
- Parameters:
- yfloat or array-like
y-indexes where to plot the lines.
- xmin, xmaxfloat or array-like
Respective beginning and end of each line. If scalars areprovided, all lines will have the same length.
- colorscolor or list of color , default:
rcParams["lines.color"](default:'C0') - linestyles{'solid', 'dashed', 'dashdot', 'dotted'}, default: 'solid'
- labelstr, default: ''
- Returns:
- Other Parameters:
- dataindexable object, optional
If given, the following parameters also accept a string
s, which isinterpreted asdata[s]ifsis a key indata:y,xmin,xmax,colors
- **kwargs
LineCollectionproperties.
Notes
Note
This is thepyplot wrapper for
axes.Axes.hlines.
On this page