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

Method _set_transform

lib/matplotlib/quiver.py:637–646  ·  view source on GitHub ↗

Set the PolyCollection transform to go from arrow width units to pixels.

(self)

Source from the content-addressed store, hash-verified

635 }, units=units)
636
637 def _set_transform(self):
638 """
639 Set the PolyCollection transform to go
640 from arrow width units to pixels.
641 """
642 dx = self._dots_per_unit(self.units)
643 self._trans_scale = dx # pixels per arrow width unit
644 trans = transforms.Affine2D().scale(dx)
645 self.set_transform(trans)
646 return trans
647
648 # Calculate angles and lengths for segment between (x, y), (x+u, y+v)
649 def _angles_lengths(self, XY, U, V, eps=1):

Callers 3

_initMethod · 0.95
get_fontFunction · 0.45

Calls 3

_dots_per_unitMethod · 0.95
scaleMethod · 0.45
set_transformMethod · 0.45

Tested by

no test coverage detected