🔵 🔵 🔵


Primary

၊၊||၊|။

pyplot.hlines() ⚬|Documentation|1st|20251021161451-00-⌔

matplotlib.pyplot.hlines — Matplotlib 3.10.8 documentation#matplotlib.pyplot.hlines

matplotlib.pyplot.hlines(y, xmin, xmax, colors=None, linestyles='solid', ﹡, label='', data=None, ﹡﹡kwargs)

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 the same length.

colors: color or list of color, default: rcParams["lines.color"] (default: 'C0')
linestyles: {‘solid’, ‘dashed’, ‘dashdot’, ‘dotted’}, default: ‘solid’
label: str, default: ”
Returns:
  • LineCollection
Other Parameters:
data: indexable 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

﹡﹡kwargs: LineCollection properties.
See also:
vlines

vertical lines

axhline

horizontal line across the Axes

Notes:

Note: This is the pyplot wrapper for axes.Axes.hlines.

Printed 2026-06-28.

(echo:: @ )

Link to original

Secondary

• • •