[ Web Proxy ]
URL:
Viewing: https://matplotlib.org/devdocs/api/_as_gen/../../api/../api/_as_gen/matplotlib.patches.Circle.html [Back]  [Original]

matplotlib.patches.Circle — Matplotlib 3.12.0.dev738+ge3fc0dad9 documentation
Back to top
Search the docs ...:

matplotlib.patches.Circle#

class matplotlib.patches.Circle(xy, radius=5, **kwargs)[source]#

Bases: Ellipse

A circle patch.

Create a true circle at center xy = (x, y) with given radius.

Unlike CirclePolygon which is a polygonal approximation, this uses Bezier splines and is much closer to a scale-free circle.

Valid keyword arguments are:

Property

Description

agg_filter

a filter function, which takes a (m, n, 3) float array and a dpi value, and returns a (m, n, 3) array and two offsets from the bottom left corner of the image

alpha

unknown

animated

bool

antialiased or aa

bool or None

blend_mode

blend mode

capstyle

CapStyle or {'butt', 'projecting', 'round'}

clip_box

BboxBase or None

clip_on

bool

clip_path

Patch or (Path, Transform) or None

color

color

edgecolor or ec

color or None

edgegapcolor

color or None

facecolor or fc

color or None

figure

Figure or SubFigure

fill

bool

fill_rule

{'nonzero', 'evenodd'}

gid

str

hatch

{'/', '\', '|', '-', '+', 'x', 'o', 'O', '.', '*'}

hatch_linewidth

unknown

hatchcolor

color or 'edge' or None

in_layout

bool

joinstyle

JoinStyle or {'miter', 'round', 'bevel'}

label

object

linestyle or ls

linestyle

linewidth or lw

float or None

mouseover

bool

path_effects

list of AbstractPathEffect

picker

None or bool or float or callable

rasterized

bool

sketch_params

(scale: float, length: float, randomness: float)

snap

bool or None

transform

Transform

url

str

visible

bool

zorder

float

get_radius()[source]#

Return the radius of the circle.

property radius#

Return the radius of the circle.

set(*, agg_filter=<UNSET>, alpha=<UNSET>, angle=<UNSET>, animated=<UNSET>, antialiased=<UNSET>, blend_mode=<UNSET>, capstyle=<UNSET>, center=<UNSET>, clip_box=<UNSET>, clip_on=<UNSET>, clip_path=<UNSET>, color=<UNSET>, edgecolor=<UNSET>, edgegapcolor=<UNSET>, facecolor=<UNSET>, fill=<UNSET>, fill_rule=<UNSET>, gid=<UNSET>, hatch=<UNSET>, hatch_linewidth=<UNSET>, hatchcolor=<UNSET>, height=<UNSET>, in_layout=<UNSET>, joinstyle=<UNSET>, label=<UNSET>, linestyle=<UNSET>, linewidth=<UNSET>, mouseover=<UNSET>, path_effects=<UNSET>, picker=<UNSET>, radius=<UNSET>, rasterized=<UNSET>, sketch_params=<UNSET>, snap=<UNSET>, transform=<UNSET>, url=<UNSET>, visible=<UNSET>, width=<UNSET>, zorder=<UNSET>)[source]#

Set multiple properties at once.

a.set(a=A, b=B, c=C)

is equivalent to

a.set_a(A)
a.set_b(B)
a.set_c(C)

In addition to the full property names, aliases are also supported, e.g. set(lw=2) is equivalent to set(linewidth=2), but it is an error to pass both simultaneously.

The order of the individual setter calls matches the order of parameters in set(). However, most properties do not depend on each other so that order is rarely relevant.

Supported properties are

Property

Description

agg_filter

a filter function, which takes a (m, n, 3) float array and a dpi value, and returns a (m, n, 3) array and two offsets from the bottom left corner of the image

alpha

float or None

angle

float

animated

bool

antialiased or aa

bool or None

blend_mode

blend mode

capstyle

CapStyle or {'butt', 'projecting', 'round'}

center

(float, float)

clip_box

BboxBase or None

clip_on

bool

clip_path

Patch or (Path, Transform) or None

color

color

edgecolor or ec

color or None

edgegapcolor

color or None

facecolor or fc

color or None

figure

Figure or SubFigure

fill

bool

fill_rule

{'nonzero', 'evenodd'}

gid

str

hatch

{'/', '\', '|', '-', '+', 'x', 'o', 'O', '.', '*'}

hatch_linewidth

unknown

hatchcolor

color or 'edge' or None

height

float

in_layout

bool

joinstyle

JoinStyle or {'miter', 'round', 'bevel'}

label

object

linestyle or ls

linestyle

linewidth or lw

float or None

mouseover

bool

path_effects

list of AbstractPathEffect

picker

None or bool or float or callable

radius

float

rasterized

bool

sketch_params

(scale: float, length: float, randomness: float)

snap

bool or None

transform

Transform

url

str

visible

bool

width

float

zorder

float

set_radius(radius)[source]#

Set the radius of the circle.

Parameters:
radiusfloat

Examples using matplotlib.patches.Circle#

[]

Clipping images with patches

Clipping images with patches
[]

Axes box aspect

Axes box aspect
[]

Artists as annotations

Artists as annotations
[]

Reference for Matplotlib artists

Reference for Matplotlib artists
[]

Dolphins

Dolphins
[]

Mmh Donuts!!!

Mmh Donuts!!!
[]

Circles, Wedges and Polygons

Circles, Wedges and Polygons
[]

ggplot style sheet

ggplot style sheet
[]

Grayscale style sheet

Grayscale style sheet
[]

Petroff style sheets

Petroff style sheets
[]

Style sheets reference

Style sheets reference
[]

Draw flat objects in 3D plot

Draw flat objects in 3D plot
[]

Simple Anchored Artists

Simple Anchored Artists
[]

Looking glass

Looking glass
[]

Anchored Artists

Anchored Artists
[]

Custom projection

Custom projection
[]

Packed-bubble chart

Packed-bubble chart
[]

Anatomy of a figure

Anatomy of a figure
[]

Radar chart (aka spider or star chart)

Radar chart (aka spider or star chart)
[]

Transformations Tutorial

Transformations Tutorial
[]

Legend guide

Legend guide
[]

Blending and compositing artists

Blending and compositing artists
[]

Blending and compositing groups of artists

Blending and compositing groups of artists
[]

Annotations

Annotations

Web Proxy Viewer  |  New URL  |  Original Page