You are reading an old version of the documentation (v3.1.3). For the latest version see
Version 3.1.3
Fork me on GitHub

Table of Contents


Axes.get_xaxis_transform(self, which='grid')

Get the transformation used for drawing x-axis labels, ticks and gridlines. The x-direction is in data coordinates and the y-direction is in axis coordinates.


This transformation is primarily used by the Axis class, and is meant to be overridden by new kinds of projections that may need to place axis elements in different locations.

Examples using matplotlib.axes.Axes.get_xaxis_transform