On this page
matplotlib.axes.Axes.stem
Axes.stem(*args, data=None, **kwargs)
-
Create a stem plot.
Call signatures:
stem(y, linefmt='b-', markerfmt='bo', basefmt='r-') stem(x, y, linefmt='b-', markerfmt='bo', basefmt='r-')
A stem plot plots vertical lines (using linefmt) at each x location from the baseline to y, and places a marker there using markerfmt. A horizontal line at 0 is plotted using basefmt.
If no x values are provided, the default is (0, 1, …, len(y) - 1)
Return value is a tuple (markerline, stemlines, baseline). See
StemContainer
See also
This document for details.
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 positional and all keyword arguments.
© 2012–2017 Matplotlib Development Team. All rights reserved.
Licensed under the Matplotlib License Agreement.
http://matplotlib.org/2.1.0/api/_as_gen/matplotlib.axes.Axes.stem.html