[ Web Proxy ]
URL:
Viewing: https://matplotlib.org/stable/api/_as_gen/../toolkits/../_as_gen/matplotlib.axes.Axes.hlines.html [Back]  [Original]

matplotlib.axes.Axes.hlines — Matplotlib 3.11.2 documentation
Back to top
Search the docs ...:

matplotlib.axes.Axes.hlines#

Axes.hlines(y, xmin, xmax, colors=None, linestyles='solid', *, label='', data=None, **kwargs)[source]#

Plot horizontal lines at each y from xmin to xmax.

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 are provided, 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:
LineCollection
Other Parameters:
dataindexable object, optional

If given, the following parameters also accept a string s, which is interpreted as data[s] if s is a key in data:

y, xmin, xmax, colors

**kwargsLineCollection properties.

See also

vlines

vertical lines

axhline

horizontal line across the Axes

Examples using matplotlib.axes.Axes.hlines#

[]

hlines and vlines

hlines and vlines
[]

Specifying colors

Specifying colors

Web Proxy Viewer  |  New URL  |  Original Page