matplotlib / 3.5.1 / _as_gen / matplotlib.pyplot.vlines.html /

matplotlib.pyplot.vlines

matplotlib.pyplot. vlines ( x, ymin, ymax, colors=None, linestyles='solid', label='', *, data=None, **kwargs ) [source]

Plot vertical lines at each x from ymin to ymax.

Parameters
x float or array-like

x-indexes where to plot the lines.

ymin, ymax 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
LineCollection
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):

x, ymin, ymax, colors

**kwargs LineCollection properties.

See also

hlines

horizontal lines

axvline

vertical line across the Axes

© 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.vlines.html