MCPcopy Create free account
hub / github.com/matplotlib/matplotlib / get_size

Method get_size

lib/mpl_toolkits/axes_grid1/axes_size.py:125–135  ·  view source on GitHub ↗
(self, renderer)

Source from the content-addressed store, hash-verified

123 self._ref_ax = ref_ax
124
125 def get_size(self, renderer):
126 l1, l2 = self._axes.get_xlim()
127 if self._aspect == "axes":
128 ref_aspect = _get_axes_aspect(self._ref_ax)
129 aspect = ref_aspect / _get_axes_aspect(self._axes)
130 else:
131 aspect = self._aspect
132
133 rel_size = abs(l2-l1)*aspect
134 abs_size = 0.
135 return rel_size, abs_size
136
137
138class AxesY(_Base):

Callers

nothing calls this directly

Calls 2

_get_axes_aspectFunction · 0.85
get_xlimMethod · 0.45

Tested by

no test coverage detected