Matplotlib.axes.Axes.get_transform() in Python Last Updated : 30 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.get_transform() Function The Axes.get_transform() function in axes module of matplotlib library is used to get the Transform instance used by this artist Syntax: Axes.get_transform(self) Parameters: This method does not accepts any parameter. Returns: This method return the Transform instance used by this artist Below examples illustrate the matplotlib.axes.Axes.get_transform() function in matplotlib.axes: Example 1: Python3 # Implementation of matplotlib function import numpy as np import matplotlib.pyplot as plt import matplotlib.transforms as mtransforms fig, ax = plt.subplots() l1, = ax.plot([0.1, 0.5, 0.9], [0.1, 0.9, 0.5], "bo-") l2, = ax.plot([0.1, 0.5, 0.9], [0.5, 0.2, 0.7], "ro-") for l in [l1, l2]: xx = l.get_xdata() yy = l.get_ydata() shadow, = ax.plot(xx, yy) shadow.update_from(l) ot = mtransforms.offset_copy(l.get_transform(), ax.figure, x = 4.0, y =-6.0, units ='points') shadow.set_transform(ot) fig.suptitle('matplotlib.axes.Axes.get_transform() \ function Example', fontweight ="bold") plt.show() Output: Example 2: Python3 # Implementation of matplotlib function import matplotlib.pyplot as plt from matplotlib import collections, colors, transforms import numpy as np nverts = 50 npts = 100 r = np.arange(nverts) theta = np.linspace(0, 2 * np.pi, nverts) xx = r * np.sin(theta) yy = r * np.cos(theta) spiral = np.column_stack([xx, yy]) rs = np.random.RandomState(19680801) xyo = rs.randn(npts, 2) colors = [colors.to_rgba(c) for c in plt.rcParams['axes.prop_cycle'].by_key()['color']] fig, ax1 = plt.subplots() col = collections.RegularPolyCollection( 7, sizes = np.abs(xx) * 10.0, offsets = xyo, transOffset = ax1.transData) trans = transforms.Affine2D().scale(fig.dpi / 72.0) col.set_transform(trans) ax1.add_collection(col, autolim = True) col.set_color(colors) print("Value Return by get_transform() :\n", col.get_transform()) fig.suptitle('matplotlib.axes.Axes.get_transform() \ function Example', fontweight ="bold") plt.show() Output: Value Return by get_transform() : Affine2D( [[1.38888889 0. 0. ] [0. 1.38888889 0. ] [0. 0. 1. ]]) Comment More infoAdvertise with us Next Article Matplotlib.axes.Axes.get_transform() in Python S SHUBHAMSINGH10 Follow Improve Article Tags : Python Python-matplotlib Matplotlib axes-class Practice Tags : python Similar Reads Matplotlib.axes.Axes.get_xaxis_transform() 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.get_yaxis_transform() 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_transform() 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.get_xaxis() 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. 1 min read Matplotlib.axes.Axes.is_transform_set() 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. 1 min read Matplotlib.axes.Axes.get_yaxis() 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. 1 min read Matplotlib.axes.Axes.get_url() 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.get_rasterized() 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.axis.Axis.get_transform() 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_transform() Function The Axis.get_transform() function 2 min read Matplotlib.axes.Axes.get_yticks() 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