Matplotlib.axis.Axis.set_label() function in Python Last Updated : 05 Jun, 2020 Comments Improve Suggest changes Like Article Like Report Matplotlib is a library in Python and it is numerical – mathematical extension for NumPy library. It is an amazing visualization library in Python for 2D plots of arrays and used for working with the broader SciPy stack. Matplotlib.axis.Axis.set_label() Function The Axis.set_label() function in axis module of matplotlib library is used to set the label that will be displayed in the legend. Syntax: Axis.set_label(self, s) Parameters: This method accepts the following parameters. s: This parameter is converted to a string by calling str. Return value: This method return the picking behavior of the artist. Below examples illustrate the matplotlib.axis.Axis.set_label() function in matplotlib.axis: Example 1: Python3 # Implementation of matplotlib function from matplotlib.axis import Axis import matplotlib.pyplot as plt import numpy as np from matplotlib.collections import EllipseCollection x = np.arange(5) y = np.arange(7) X, Y = np.meshgrid(x**2, y**3) XY = np.column_stack((X.ravel(), Y.ravel())) fig, ax = plt.subplots() ec = EllipseCollection(5, 7, 5, units ='y', offsets = XY * 0.5, transOffset = ax.transData, cmap ="plasma") ec.set_array((X * Y + X * X).ravel()) ax.add_collection(ec) ax.autoscale_view() ax.set_xlabel('X') ax.set_ylabel('y') cbar = plt.colorbar(ec) cbar.set_label('X + Y') fig.suptitle('matplotlib.axis.Axis.set_label() \ function Example\n', fontweight ="bold") plt.show() Output: Example 2: Python3 # Implementation of matplotlib function from matplotlib.axis import Axis import matplotlib.pyplot as plt import numpy as np np.random.seed(19680801) n = 100000 x = np.random.standard_normal(n) y = 2 * np.random.standard_normal(n) z =[1, 2, 3, 4] fig, ax = plt.subplots() hb = ax.hexbin(x, y, gridsize = 50, bins ='log', cmap ='bone') cb = fig.colorbar(hb, ax = ax) cb.set_label('log') fig.suptitle('matplotlib.axis.Axis.set_label() \ function Example\n', fontweight ="bold") plt.show() Output: Comment More infoAdvertise with us Next Article Matplotlib.axis.Axis.set_label() function in Python S SHUBHAMSINGH10 Follow Improve Article Tags : Python Python-matplotlib Matplotlib-Axis Class Practice Tags : python Similar Reads Matplotlib.axis.Axis.set_label_text() function in Python Matplotlib is a library in Python and it is numerical â mathematical extension for NumPy library. It is an amazing visualization library in Python for 2D plots of arrays and used for working with the broader SciPy stack. Matplotlib.axis.Axis.set_label_text() Function The Axis.set_label_text() functi 2 min read Matplotlib.axis.Axis.get_label_text() function in Python Matplotlib is a library in Python and it is numerical â mathematical extension for NumPy library. It is an amazing visualization library in Python for 2D plots of arrays and used for working with the broader SciPy stack. Matplotlib.axis.Axis.get_label_text() Function The Axis.get_label_text() functi 2 min read Matplotlib.axis.Axis.set_label_coords() function in Python Matplotlib is a library in Python and it is numerical â mathematical extension for NumPy library. It is an amazing visualization library in Python for 2D plots of arrays and used for working with the broader SciPy stack. Matplotlib.axis.Axis.set_label_coords() Function The Axis.set_label_coords() fu 2 min read Matplotlib.axis.Axis.set() function in Python Matplotlib is a library in Python and it is numerical â mathematical extension for NumPy library. It is an amazing visualization library in Python for 2D plots of arrays and used for working with the broader SciPy stack. Matplotlib.axis.Axis.set() Function The Axis.set() function in axis module of m 2 min read Matplotlib.axis.Axis.set_label_position() function in Python Matplotlib is a library in Python and it is numerical â mathematical extension for NumPy library. It is an amazing visualization library in Python for 2D plots of arrays and used for working with the broader SciPy stack. Matplotlib.axis.Axis.set_label_position() Function The Axis.set_label_position( 2 min read Matplotlib.axis.Axis.get_label() function in Python Matplotlib is a library in Python and it is numerical â mathematical extension for NumPy library. It is an amazing visualization library in Python for 2D plots of arrays and used for working with the broader SciPy stack. Matplotlib.axis.Axis.get_label() Function The Axis.get_label() function in axis 2 min read Matplotlib.axis.Tick.set_label() function in Python Matplotlib is a library in Python and it is numerical â mathematical extension for NumPy library. It is an amazing visualization library in Python for 2D plots of arrays and used for working with the broader SciPy stack. Matplotlib.axis.Tick.set_label() Function The Tick.set_label() function in axis 2 min read Matplotlib.axis.Axis.set_gid() function in Python Matplotlib is a library in Python and it is numerical â mathematical extension for NumPy library. It is an amazing visualization library in Python for 2D plots of arrays and used for working with the broader SciPy stack. Matplotlib.axis.Axis.set_gid() Function The Axis.set_gid() function in axis mod 2 min read Matplotlib.axis.Axis.set_ticks() function in Python Matplotlib is a library in Python and it is numerical â mathematical extension for NumPy library. It is an amazing visualization library in Python for 2D plots of arrays and used for working with the broader SciPy stack. Matplotlib.axis.Axis.set_ticks() Function The Axis.set_ticks() function in axis 2 min read Matplotlib.axis.Axis.set_units() function in Python Matplotlib is a library in Python and it is numerical â mathematical extension for NumPy library. It is an amazing visualization library in Python for 2D plots of arrays and used for working with the broader SciPy stack. Matplotlib.axis.Axis.set_units() Function The Axis.set_units() function in axis 2 min read Like