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

Method get_size

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

Source from the content-addressed store, hash-verified

149 self._ref_ax = ref_ax
150
151 def get_size(self, renderer):
152 l1, l2 = self._axes.get_ylim()
153
154 if self._aspect == "axes":
155 ref_aspect = _get_axes_aspect(self._ref_ax)
156 aspect = _get_axes_aspect(self._axes)
157 else:
158 aspect = self._aspect
159
160 rel_size = abs(l2-l1)*aspect
161 abs_size = 0.
162 return rel_size, abs_size
163
164
165class MaxExtent(_Base):

Callers

nothing calls this directly

Calls 2

_get_axes_aspectFunction · 0.85
get_ylimMethod · 0.45

Tested by

no test coverage detected