matplotlib.axes.Axes.vlines
-
Axes.vlines(self, x, ymin, ymax, colors='k', linestyles='solid', label='', *, data=None, **kwargs)
[source] -
Plot vertical lines.
Plot vertical lines at each x from ymin to ymax.
Parameters: -
xscalar or 1D array-like
-
x-indexes where to plot the lines.
-
ymin, ymaxscalar or 1D array-like
-
Respective beginning and end of each line. If scalars are provided, all lines will have same length.
-
colorsarray-like of colors, optional, default: 'k'
-
linestyles{'solid', 'dashed', 'dashdot', 'dotted'}, optional
-
labelstr, optional, default: ''
Returns: -
linesLineCollection
Other Parameters: -
**kwargsLineCollection properties.
Notes
Note
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'.
Objects passed as data must support item access (
data[<arg>]
) and membership test (<arg> in data
). -
Examples using matplotlib.axes.Axes.vlines
© 2012–2018 Matplotlib Development Team. All rights reserved.
Licensed under the Matplotlib License Agreement.
https://matplotlib.org/3.2.2/api/_as_gen/matplotlib.axes.Axes.vlines.html