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

Method _dots_per_unit

lib/matplotlib/quiver.py:623–635  ·  view source on GitHub ↗

Return a scale factor for converting from units to pixels.

(self, units)

Source from the content-addressed store, hash-verified

621 self.stale = True
622
623 def _dots_per_unit(self, units):
624 """Return a scale factor for converting from units to pixels."""
625 bb = self.axes.bbox
626 vl = self.axes.viewLim
627 return _api.getitem_checked({
628 'x': bb.width / vl.width,
629 'y': bb.height / vl.height,
630 'xy': np.hypot(*bb.size) / np.hypot(*vl.size),
631 'width': bb.width,
632 'height': bb.height,
633 'dots': 1.,
634 'inches': self.axes.get_figure(root=True).dpi,
635 }, units=units)
636
637 def _set_transform(self):
638 """

Callers 2

_set_transformMethod · 0.95
_make_vertsMethod · 0.95

Calls 1

get_figureMethod · 0.45

Tested by

no test coverage detected