MCPcopy Index your code
hub / github.com/matplotlib/matplotlib / get_xaxis_text2_transform

Method get_xaxis_text2_transform

lib/matplotlib/axes/_base.py:1026–1051  ·  view source on GitHub ↗

Returns ------- transform : Transform The transform used for drawing secondary x-axis labels, which will add *pad_points* of padding (in points) between the axis and the label. The x-direction is in data coordinates and the y-direction

(self, pad_points)

Source from the content-addressed store, hash-verified

1024 "top", labels_align)
1025
1026 def get_xaxis_text2_transform(self, pad_points):
1027 """
1028 Returns
1029 -------
1030 transform : Transform
1031 The transform used for drawing secondary x-axis labels, which will
1032 add *pad_points* of padding (in points) between the axis and the
1033 label. The x-direction is in data coordinates and the y-direction
1034 is in axis coordinates
1035 valign : {'center', 'top', 'bottom', 'baseline', 'center_baseline'}
1036 The text vertical alignment.
1037 halign : {'center', 'left', 'right'}
1038 The text horizontal alignment.
1039
1040 Notes
1041 -----
1042 This transformation is primarily used by the `~matplotlib.axis.Axis`
1043 class, and is meant to be overridden by new kinds of projections that
1044 may need to place axis elements in different locations.
1045 """
1046 labels_align = mpl.rcParams["xtick.alignment"]
1047 return (self.get_xaxis_transform(which='tick2') +
1048 mtransforms.ScaledTranslation(
1049 0, pad_points / 72,
1050 self.get_figure(root=False).dpi_scale_trans),
1051 "bottom", labels_align)
1052
1053 def get_yaxis_transform(self, which='grid'):
1054 """

Callers 1

_get_text2_transformMethod · 0.45

Calls 2

get_xaxis_transformMethod · 0.95
get_figureMethod · 0.45

Tested by

no test coverage detected