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

Method get_offset

lib/matplotlib/offsetbox.py:292–308  ·  view source on GitHub ↗

Return the offset as a tuple (x, y). The extent parameters have to be provided to handle the case where the offset is dynamically determined by a callable (see `~.OffsetBox.set_offset`). Parameters ---------- bbox : `.Bbox` renderer

(self, bbox, renderer)

Source from the content-addressed store, hash-verified

290
291 @_compat_get_offset
292 def get_offset(self, bbox, renderer):
293 """
294 Return the offset as a tuple (x, y).
295
296 The extent parameters have to be provided to handle the case where the
297 offset is dynamically determined by a callable (see
298 `~.OffsetBox.set_offset`).
299
300 Parameters
301 ----------
302 bbox : `.Bbox`
303 renderer : `.RendererBase` subclass
304 """
305 return (
306 self._offset(bbox.width, bbox.height, -bbox.x0, -bbox.y0, renderer)
307 if callable(self._offset)
308 else self._offset)
309
310 def set_width(self, width):
311 """

Callers 2

get_window_extentMethod · 0.95
drawMethod · 0.95

Calls 1

_offsetMethod · 0.80

Tested by

no test coverage detected