matplotlib.pyplot.vlines#

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

Plot vertical lines at eachx fromymin toymax.

Parameters:
xfloat or array-like

x-indexes where to plot the lines.

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

If given, the following parameters also accept a strings, which isinterpreted asdata[s] ifs is a key indata:

x,ymin,ymax,colors

**kwargsLineCollection properties.

See also

hlines

horizontal lines

axvline

vertical line across the Axes

Notes

Note

This is thepyplot wrapper foraxes.Axes.vlines.

Examples usingmatplotlib.pyplot.vlines#

Violin plot customization

Violin plot customization