Matplotlib.axes.Axes.stem() in Python Last Updated : 13 Apr, 2020 Comments Improve Suggest changes Like Article Like Report Matplotlib is a library in Python and it is numerical - mathematical extension for NumPy library. The Axes Class contains most of the figure elements: Axis, Tick, Line2D, Text, Polygon, etc., and sets the coordinate system. And the instances of Axes supports callbacks through a callbacks attribute. matplotlib.axes.Axes.stem() Function The Axes.stem() function in axes module of matplotlib library is used to create a stem plot. Syntax: Axes.stem(self, *args, linefmt=None, markerfmt=None, basefmt=None, bottom=0, label=None, use_line_collection=False, data=None) Parameters: This method accept the following parameters that are described below: x: This parameter is the sequence of x coordinates of the stems. y: This parameter is the sequence of y coordinates of the stem heads. linefmt: This parameter is the string defining the properties of the vertical lines. markerfmt: This parameter is the string defining the properties of the markers at the stem heads. basefmt: This parameter is the string defining the properties of the baseline. bottom: This parameter is the y-position of the baseline. label: This parameter is the label to use for the stems in legends. Returns: This returns the following: StemContainer: This returns the container which may be treated like a tuple (markerline, stemlines, baseline). Below examples illustrate the matplotlib.axes.Axes.broken_barh() function in matplotlib.axes: Example-1: Python3 # Implementation of matplotlib function import matplotlib.pyplot as plt fig, ax = plt.subplots() ax.stem([0.3, 1.5, 2.7], [1, 3.6, 2.7], label ="stem test") ax.legend() ax.set_title('matplotlib.axes.Axes.stem Example') plt.show() Output: Example-2: Python3 # Implementation of matplotlib function import matplotlib.pyplot as plt import numpy as np x = np.linspace(0.1, 2 * np.pi, 41) y = np.exp(np.sin(x)) fig, ax = plt.subplots() ax.stem(x, y, linefmt ='grey', markerfmt ='D', bottom = 1.1, use_line_collection = True) ax.set_title('matplotlib.axes.Axes.stem Example') plt.show() Comment More infoAdvertise with us Next Article Matplotlib.axes.Axes.stem() in Python S SHUBHAMSINGH10 Follow Improve Article Tags : Python Python-matplotlib Practice Tags : python Similar Reads matplotlib.axes.Axes.step() in Python Matplotlib is a library in Python and it is numerical - mathematical extension for NumPy library. The Axes Class contains most of the figure elements: Axis, Tick, Line2D, Text, Polygon, etc., and sets the coordinate system. And the instances of Axes supports callbacks through a callbacks attribute. 2 min read Matplotlib.axes.Axes.set() in Python Axes.set() function in Matplotlib is used to set multiple Axes properties at once using keyword arguments (**kwargs). This is a convenient way to configure an Axes object with labels, limits, title and more, all in one call. It's key features include:Acts as a batch property setter for Axes.Uses key 2 min read Matplotlib.axes.Axes.spy() in Python Matplotlib is a library in Python and it is numerical - mathematical extension for NumPy library. The Axes Class contains most of the figure elements: Axis, Tick, Line2D, Text, Polygon, etc., and sets the coordinate system. And the instances of Axes supports callbacks through a callbacks attribute. 2 min read Matplotlib.axes.Axes.table() in Python Matplotlib is a library in Python and it is numerical â mathematical extension for NumPy library. The Axes Class contains most of the figure elements: Axis, Tick, Line2D, Text, Polygon, etc., and sets the coordinate system. And the instances of Axes supports callbacks through a callbacks attribute. 3 min read Matplotlib.axes.Axes.scatter() in Python Matplotlib is a library in Python and it is numerical - mathematical extension for NumPy library. The Axes Class contains most of the figure elements: Axis, Tick, Line2D, Text, Polygon, etc., and sets the coordinate system. And the instances of Axes supports callbacks through a callbacks attribute. 4 min read Matplotlib.axes.Axes.semilogy() in Python Matplotlib is a library in Python and it is numerical - mathematical extension for NumPy library.The Axes Class contains most of the figure elements: Axis, Tick, Line2D, Text, Polygon, etc., and sets the coordinate system. And the instances of Axes supports callbacks through a callbacks attribute. m 2 min read Matplotlib.axes.Axes.set_xlim() in Python Matplotlib is a library in Python and it is numerical - mathematical extension for NumPy library. The Axes Class contains most of the figure elements: Axis, Tick, Line2D, Text, Polygon, etc., and sets the coordinate system. And the instances of Axes supports callbacks through a callbacks attribute. 2 min read matplotlib.axes.Axes.semilogx() in Python Matplotlib is a library in Python and it is numerical - mathematical extension for NumPy library. The Axes Class contains most of the figure elements: Axis, Tick, Line2D, Text, Polygon, etc., and sets the coordinate system. And the instances of Axes supports callbacks through a callbacks attribute. 2 min read Matplotlib.axes.Axes.set_ylim() in Python Matplotlib is a library in Python and it is numerical - mathematical extension for NumPy library. The Axes Class contains most of the figure elements: Axis, Tick, Line2D, Text, Polygon, etc., and sets the coordinate system. And the instances of Axes supports callbacks through a callbacks attribute. 2 min read Matplotlib.axes.Axes.update() in Python Matplotlib is a library in Python and it is numerical â mathematical extension for NumPy library. The Axes Class contains most of the figure elements: Axis, Tick, Line2D, Text, Polygon, etc., and sets the coordinate system. And the instances of Axes supports callbacks through a callbacks attribute. 2 min read Like