You are reading documentation for the unreleased version of Matplotlib. Try searching for the released version of this page instead?
Version 2.1.1.post1074+gb67098b
Fork me on GitHub

This Page


Axes.vlines(x, ymin, ymax, colors='k', linestyles='solid', label='', *, data=None, **kwargs)

Plot vertical lines.

Plot vertical lines at each x from ymin to ymax.


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: ‘’


lines : LineCollection

Other Parameters:

**kwargs : LineCollection properties.

See also

horizontal lines
vertical line across the axes
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: ‘colors’, ‘x’, ‘ymax’, ‘ymin’.