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

Class CirclePolygon

lib/matplotlib/patches.py:1676–1698  ·  view source on GitHub ↗

A polygon-approximation of a circle patch.

Source from the content-addressed store, hash-verified

1674
1675
1676class CirclePolygon(RegularPolygon):
1677 """A polygon-approximation of a circle patch."""
1678
1679 def __str__(self):
1680 s = "CirclePolygon((%g, %g), radius=%g, resolution=%d)"
1681 return s % (self.xy[0], self.xy[1], self.radius, self.numvertices)
1682
1683 @_docstring.interpd
1684 def __init__(self, xy, radius=5, *,
1685 resolution=20, # the number of vertices
1686 ** kwargs):
1687 """
1688 Create a circle at *xy* = (*x*, *y*) with given *radius*.
1689
1690 This circle is approximated by a regular polygon with *resolution*
1691 sides. For a smoother circle drawn with splines, see `Circle`.
1692
1693 Valid keyword arguments are:
1694
1695 %(Patch:kwdoc)s
1696 """
1697 super().__init__(
1698 xy, resolution, radius=radius, orientation=0, **kwargs)
1699
1700
1701class Ellipse(Patch):

Callers 1

_make_barbsMethod · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…