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

Method _locate

lib/mpl_toolkits/axes_grid1/axes_divider.py:577–591  ·  view source on GitHub ↗
(self, nx, ny, nx1, ny1, axes, renderer)

Source from the content-addressed store, hash-verified

575 return super().new_locator(0, ny, 0, ny1)
576
577 def _locate(self, nx, ny, nx1, ny1, axes, renderer):
578 # docstring inherited
579 ny += self._yrefindex
580 ny1 += self._yrefindex
581 fig_w, fig_h = self._fig.bbox.size / self._fig.dpi
582 x, y, w, h = self.get_position_runtime(axes, renderer)
583 summed_hs = self.get_vertical_sizes(renderer)
584 equal_ws = self.get_horizontal_sizes(renderer)
585 y0, x0, oy, ww = _locate(
586 y, x, h, w, summed_hs, equal_ws, fig_h, fig_w, self.get_anchor())
587 if ny1 is None:
588 ny1 = -1
589 x1, w1 = x0, ww
590 y1, h1 = y0 + oy[ny] / fig_h, (oy[ny1] - oy[ny]) / fig_h
591 return mtransforms.Bbox.from_bounds(x1, y1, w1, h1)
592
593
594def make_axes_locatable(axes):

Callers

nothing calls this directly

Calls 6

_locateFunction · 0.85
get_position_runtimeMethod · 0.80
get_vertical_sizesMethod · 0.80
get_horizontal_sizesMethod · 0.80
from_boundsMethod · 0.80
get_anchorMethod · 0.45

Tested by

no test coverage detected