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

Method _get_affine_transform

lib/matplotlib/projections/geo.py:108–114  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

106 Affine2D().translate(8, 0)
107
108 def _get_affine_transform(self):
109 transform = self._get_core_transform(1)
110 xscale, _ = transform.transform((np.pi, 0))
111 _, yscale = transform.transform((0, np.pi/2))
112 return Affine2D() \
113 .scale(0.5 / xscale, 0.5 / yscale) \
114 .translate(0.5, 0.5)
115
116 def get_xaxis_transform(self, which='grid'):
117 _api.check_in_list(['tick1', 'tick2', 'grid'], which=which)

Callers 1

Calls 5

Affine2DClass · 0.90
translateMethod · 0.80
_get_core_transformMethod · 0.45
transformMethod · 0.45
scaleMethod · 0.45

Tested by

no test coverage detected