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

Method get_yaxis_transform

lib/matplotlib/axes/_base.py:1053–1079  ·  view source on GitHub ↗

Get the transformation used for drawing y-axis labels, ticks and gridlines. The x-direction is in axis coordinates and the y-direction is in data coordinates. .. note:: This transformation is primarily used by the `~matplotlib.axis.Axis` cl

(self, which='grid')

Source from the content-addressed store, hash-verified

1051 "bottom", labels_align)
1052
1053 def get_yaxis_transform(self, which='grid'):
1054 """
1055 Get the transformation used for drawing y-axis labels, ticks
1056 and gridlines. The x-direction is in axis coordinates and the
1057 y-direction is in data coordinates.
1058
1059 .. note::
1060
1061 This transformation is primarily used by the
1062 `~matplotlib.axis.Axis` class, and is meant to be
1063 overridden by new kinds of projections that may need to
1064 place axis elements in different locations.
1065
1066 Parameters
1067 ----------
1068 which : {'grid', 'tick1', 'tick2'}
1069 """
1070 if which == 'grid':
1071 return self._yaxis_transform
1072 elif which == 'tick1':
1073 # for cartesian projection, this is bottom spine
1074 return self.spines.left.get_spine_transform()
1075 elif which == 'tick2':
1076 # for cartesian projection, this is top spine
1077 return self.spines.right.get_spine_transform()
1078 else:
1079 raise ValueError(f'unknown value for which: {which!r}')
1080
1081 def get_yaxis_text1_transform(self, pad_points):
1082 """

Callers 15

_update_line_limitsMethod · 0.95
_update_patch_limitsMethod · 0.95
get_tick_transformMethod · 0.45
get_spine_transformMethod · 0.45
__init__Method · 0.45
format_data_shortMethod · 0.45
__init__Method · 0.45
new_axesMethod · 0.45
axhlineMethod · 0.45
axhspanMethod · 0.45

Calls 1

get_spine_transformMethod · 0.80

Tested by 3

test_axis_method_errorsFunction · 0.36
test_connection_patchFunction · 0.36