mpl.pyplot.vlines()

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

Plot vertical lines.

Plot vertical lines at each x from ymin to ymax.

Parameters:

x : scalar or 1D array_like

x-indexes where to plot the lines.

ymin, ymax : scalar or 1D array_like

Respective beginning and end of each line. If scalars are provided, all lines will have same length.

colors : array_like of colors, optional, default: ‘k’

linestyles : [‘solid’ | ‘dashed’ | ‘dashdot’ | ‘dotted’], optional

label : string, optional, default: ‘’

Returns:

lines : ~matplotlib.collections.LineCollection

Other Parameters:
 

kwargs : ~matplotlib.collections.LineCollection properties.

See also

hlines
horizontal lines

Notes

In addition to the above described arguments, this function can take a data keyword argument. If such a data argument is given, the following arguments are replaced by data[<arg>]:

  • All arguments with the following names: ‘x’, ‘colors’, ‘ymin’, ‘ymax’.

Additional kwargs: hold = [True|False] overrides default hold state

Examples