Note
Go to the endto download the full example code.
Stem plot#
stem plots vertical lines from a baseline to the y-coordinate andplaces a marker at the tip.

The position of the baseline can be adapted usingbottom.The parameterslinefmt,markerfmt, andbasefmt control basic formatproperties of the plot. However, in contrast toplot not allproperties are configurable via keyword arguments. For more advancedcontrol adapt the line objects returned bypyplot.
markerline,stemlines,baseline=plt.stem(x,y,linefmt='grey',markerfmt='D',bottom=1.1)markerline.set_markerfacecolor('none')plt.show()

References
The use of the following functions, methods, classes and modules is shownin this example:
Tags:plot-type: stemlevel: beginner