matplotlib 3.5.1

Other ParametersParametersReturnsBackRef
hlines(y, xmin, xmax, colors=None, linestyles='solid', label='', *, data=None, **kwargs)

Other Parameters

data : indexable object, optional

If given, the following parameters also accept a string s , which is interpreted as data[s] (unless this raises an exception):

y, xmin, xmax, colors

**kwargs : `~matplotlib.collections.LineCollection` properties.

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: :rc:`lines.color`
linestyles : {'solid', 'dashed', 'dashdot', 'dotted'}, optional
label : str, default: ''

Returns

`~matplotlib.collections.LineCollection`

Plot horizontal lines at each y from xmin to xmax.

See Also

axhline

horizontal line across the Axes

vlines

vertical lines

Examples

See :

Back References

The following pages refer to to this document either explicitly or contain code examples using this.

matplotlib.pyplot.axhline scipy.signal._peak_finding.find_peaks matplotlib.pyplot.vlines matplotlib.pyplot.plotting scipy.signal._peak_finding.peak_widths

Local connectivity graph

Hover to see nodes names; edges to Self not shown, Caped at 50 nodes.

Using a canvas is more power efficient and can get hundred of nodes ; but does not allow hyperlinks; , arrows or text (beyond on hover)

SVG is more flexible but power hungry; and does not scale well to 50 + nodes.

All aboves nodes referred to, (or are referred from) current nodes; Edges from Self to other have been omitted (or all nodes would be connected to the central node "self" which is not useful). Nodes are colored by the library they belong to, and scaled with the number of references pointing them


File: /matplotlib/pyplot.py#2623
type: <class 'function'>
Commit: