Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 32a5daf

Browse files
author
astromancer
committed
add whats new
1 parent 83047be commit 32a5daf

1 file changed

Lines changed: 13 additions & 0 deletions

File tree

doc/users/next_whats_new/annulus.rst

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,16 @@ Add ``Annulus`` patch
22
---------------------
33

44
A new class for drawing elliptical annuli.
5+
6+
.. plot::
7+
8+
import matplotlib.pyplot as plt
9+
from matplotlib.patches import Annulus
10+
11+
fig, ax = plt.subplots()
12+
cir = Annulus((0.5, 0.5), 0.2, 0.05, fc='g') # circular annulus
13+
ell = Annulus((0.5, 0.5), (0.5, 0.3), 0.1, 45, # elliptical
14+
fc='m', ec='b', alpha=0.5, hatch='xxx')
15+
ax.add_patch(cir)
16+
ax.add_patch(ell)
17+
ax.set_aspect('equal')

0 commit comments

Comments
 (0)