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

Method get_yaxis_text2_transform

lib/matplotlib/axes/_base.py:1108–1133  ·  view source on GitHub ↗

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

(self, pad_points)

Source from the content-addressed store, hash-verified

1106 labels_align, "right")
1107
1108 def get_yaxis_text2_transform(self, pad_points):
1109 """
1110 Returns
1111 -------
1112 transform : Transform
1113 The transform used for drawing secondary y-axis labels, which will
1114 add *pad_points* of padding (in points) between the axis and the
1115 label. The x-direction is in axis coordinates and the y-direction
1116 is in data coordinates
1117 valign : {'center', 'top', 'bottom', 'baseline', 'center_baseline'}
1118 The text vertical alignment.
1119 halign : {'center', 'left', 'right'}
1120 The text horizontal alignment.
1121
1122 Notes
1123 -----
1124 This transformation is primarily used by the `~matplotlib.axis.Axis`
1125 class, and is meant to be overridden by new kinds of projections that
1126 may need to place axis elements in different locations.
1127 """
1128 labels_align = mpl.rcParams["ytick.alignment"]
1129 return (self.get_yaxis_transform(which='tick2') +
1130 mtransforms.ScaledTranslation(
1131 pad_points / 72, 0,
1132 self.get_figure(root=False).dpi_scale_trans),
1133 labels_align, "left")
1134
1135 def _update_transScale(self):
1136 self.transScale.set(

Callers 1

_get_text2_transformMethod · 0.45

Calls 2

get_yaxis_transformMethod · 0.95
get_figureMethod · 0.45

Tested by

no test coverage detected