Matplotlib.axes.Axes.set_axisbelow() in Python Last Updated : 19 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.set_axisbelow() Function The Axes.set_axisbelow() function in axes module of matplotlib library is used to set whether axis ticks and gridlines are above or below most artists. Syntax: Axes.set_axisbelow(self, b) Parameters: This method accept only one parameters. b: This parameter contains a boolean value and it's possible values are : True, False or "line". Returns:This method does not returns anything. Below examples illustrate the matplotlib.axes.Axes.set_axisbelow() function in matplotlib.axes: Example 1: Python3 # Implementation of matplotlib function import matplotlib.pyplot as plt import numpy as np # Random test data np.random.seed(19680801) all_data = [np.random.normal(0, std, size = 100) for std in range(1, 6)] labels = ['x1', 'x2', 'x3', 'x4', 'x5'] fig, ax = plt.subplots() bplot = ax.boxplot(all_data, vert = True, patch_artist = True, labels = labels) colors = ['lightpink', 'lightblue', 'lightgreen', "lightgrey", "yellow"] for patch, color in zip(bplot['boxes'], colors): patch.set_facecolor(color) ax.yaxis.grid(True, color ="green", lw = 2) ax.set_axisbelow(True) ax.set_xlabel('Samples') ax.set_ylabel('Observed values') ax.set_title('matplotlib.axes.Axes.set_axisbelow() \ Example\n', fontsize = 12, fontweight ='bold') plt.show() Output: Example 2: Python3 # Implementation of matplotlib function import matplotlib.pyplot as plt import numpy as np # Random test data np.random.seed(19680801) all_data = [np.random.normal(0, std, size = 100) for std in range(1, 6)] labels = ['x1', 'x2', 'x3', 'x4', 'x5'] fig, ax = plt.subplots() bplot = ax.boxplot(all_data, vert = True, patch_artist = True, labels = labels) colors = ['lightpink', 'lightblue', 'lightgreen', "lightgrey", "yellow"] for patch, color in zip(bplot['boxes'], colors): patch.set_facecolor(color) ax.yaxis.grid(True, color ="green", lw = 2) ax.set_axisbelow(False) ax.set_xlabel('Samples') ax.set_ylabel('Observed values') ax.set_title('matplotlib.axes.Axes.set_axisbelow()\ Example\n', fontsize = 12, fontweight ='bold') plt.show() Output: Comment More infoAdvertise with us Next Article Matplotlib.axes.Axes.set_axisbelow() in Python S SHUBHAMSINGH10 Follow Improve Article Tags : Python Python-matplotlib Practice Tags : python Similar Reads Matplotlib.axes.Axes.set_axis_on() in Python Axes.set_axis_on() function in Matplotlib is used to turn on the axis lines, ticks, tick labels, and axis labels on a given Axes object. It is a simple way to make the axis visible if it was previously turned off. It's key features include:Turns on the axis lines, ticks, tick labels and axis labels. 2 min read Matplotlib.axes.Axes.get_axisbelow() 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_axis_off() 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.axis() in Python The Axes.axis() function in Matplotlib is used to get or set the properties of the x-axis and y-axis limits on a given Axes object. It provides an easy way to control the view limits, aspect ratio, and visibility of the axes in a plot. It's key feature include:Get the current axis limits as [xmin, x 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 Like