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

Method _set_star

lib/matplotlib/markers.py:648–668  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

646 self._joinstyle = self._user_joinstyle or JoinStyle.miter
647
648 def _set_star(self):
649 self._transform = Affine2D().scale(0.5)
650 self._snap_threshold = 5.0
651
652 polypath = Path.unit_regular_star(5, innerCircle=0.381966)
653
654 if not self._half_fill():
655 self._path = polypath
656 else:
657 verts = polypath.vertices
658 top = Path(np.concatenate([verts[0:4], verts[7:10], verts[0:1]]))
659 bottom = Path(np.concatenate([verts[3:8], verts[3:4]]))
660 left = Path(np.concatenate([verts[0:6], verts[0:1]]))
661 right = Path(np.concatenate([verts[0:1], verts[5:10], verts[0:1]]))
662 self._path, self._alt_path = {
663 'top': (top, bottom), 'bottom': (bottom, top),
664 'left': (left, right), 'right': (right, left),
665 }[self.get_fillstyle()]
666 self._alt_transform = self._transform
667
668 self._joinstyle = self._user_joinstyle or JoinStyle.bevel
669
670 def _set_hexagon1(self):
671 self._transform = Affine2D().scale(0.5)

Callers

nothing calls this directly

Calls 6

_half_fillMethod · 0.95
get_fillstyleMethod · 0.95
Affine2DClass · 0.85
PathClass · 0.85
unit_regular_starMethod · 0.80
scaleMethod · 0.45

Tested by

no test coverage detected