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

Skip to content

Commit a7da9ff

Browse files
committed
added some ellipse and inside poly examples and tests
svn path=/trunk/matplotlib/; revision=2754
1 parent 2025ce4 commit a7da9ff

1 file changed

Lines changed: 19 additions & 0 deletions

File tree

examples/ellipse_rotated.py

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
from pylab import *
2+
from matplotlib.patches import Ellipse
3+
4+
delta = 45.0 # degrees
5+
6+
angles = arange(0, 360+delta, delta)
7+
ells = [Ellipse((1, 1), 4, 2, a) for a in angles]
8+
9+
a = subplot(111, aspect='equal')
10+
11+
for e in ells:
12+
e.set_clip_box(a.bbox)
13+
e.set_alpha(0.1)
14+
a.add_artist(e)
15+
16+
xlim(-2, 4)
17+
ylim(-1, 3)
18+
19+
show()

0 commit comments

Comments
 (0)