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

Method _locate

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

Source from the content-addressed store, hash-verified

538 return super().new_locator(nx, 0, nx1, 0)
539
540 def _locate(self, nx, ny, nx1, ny1, axes, renderer):
541 # docstring inherited
542 nx += self._xrefindex
543 nx1 += self._xrefindex
544 fig_w, fig_h = self._fig.bbox.size / self._fig.dpi
545 x, y, w, h = self.get_position_runtime(axes, renderer)
546 summed_ws = self.get_horizontal_sizes(renderer)
547 equal_hs = self.get_vertical_sizes(renderer)
548 x0, y0, ox, hh = _locate(
549 x, y, w, h, summed_ws, equal_hs, fig_w, fig_h, self.get_anchor())
550 if nx1 is None:
551 nx1 = -1
552 x1, w1 = x0 + ox[nx] / fig_w, (ox[nx1] - ox[nx]) / fig_w
553 y1, h1 = y0, hh
554 return mtransforms.Bbox.from_bounds(x1, y1, w1, h1)
555
556
557class VBoxDivider(SubplotDivider):

Callers

nothing calls this directly

Calls 6

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

Tested by

no test coverage detected