matplotlib.axes.Axes.step() 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.step() Function The Axes.errorbar() function in axes module of matplotlib library is used to make a step plot.. Syntax: Axes.step(self, x, y, *args, where='pre', data=None, **kwargs) Parameters: This method accept the following parameters that are described below: x, y: These parameter are the horizontal and vertical coordinates of the data points. fmt: This parameter is an optional parameter and it contains the string value. data: This parameter is also an optional parameter. And it is the object with labelled data. where: This parameter is also an optional parameter. And it is used to define where the steps should be placed. The values are {'pre', 'post', 'mid'}. pre is the default value Returns: This returns the following: lines:This returns the list of Line2D objects representing the plotted data. Below examples illustrate the matplotlib.axes.Axes.step() function in matplotlib.axes: Example-1: Python3 # Implementation of matplotlib function import numpy as np import matplotlib.pyplot as plt x = np.arange(16) y = np.sin(x / 3) fig, ax = plt.subplots() ax.step(x, y + 2, color ='green') ax.plot(x, y + 2, 'o--', color ='black', alpha = 0.3) ax.set_title('matplotlib.axes.Axes.step Example1') plt.show() Output: Example-2: Python3 # Implementation of matplotlib function import numpy as np import matplotlib.pyplot as plt x = np.arange(16) y = np.sin(x / 3) fig, ax = plt.subplots() ax.step(x, y + 2, label ='pre (default)') ax.plot(x, y + 2, 'o--', color ='black', alpha = 0.3) ax.step(x, y + 1, where ='mid', label ='mid') ax.plot(x, y + 1, 'o--', color ='black', alpha = 0.3) ax.step(x, y, where ='post', label ='post') ax.plot(x, y, 'o--', color ='black', alpha = 0.3) ax.grid(axis ='x', color ='0.95') ax.legend(title ='Parameter where:') ax.set_title('matplotlib.axes.Axes.step Example2') plt.show() Output: Comment More infoAdvertise with us Next Article matplotlib.axes.Axes.step() in Python S SHUBHAMSINGH10 Follow Improve Article Tags : Python Python-matplotlib Practice Tags : python Similar Reads 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.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 Matplotlib.axes.Axes.triplot() 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.twiny() 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_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.vlines() 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.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 Like