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

Skip to content

Commit cdd9f6d

Browse files
committed
mep12 on ellipse_rotated.py
1 parent ee9e046 commit cdd9f6d

File tree

1 file changed

+7
-6
lines changed

1 file changed

+7
-6
lines changed
Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,20 @@
1-
from pylab import *
1+
import matplotlib.pyplot as plt
2+
import numpy as np
23
from matplotlib.patches import Ellipse
34

45
delta = 45.0 # degrees
56

6-
angles = arange(0, 360 + delta, delta)
7+
angles = np.arange(0, 360 + delta, delta)
78
ells = [Ellipse((1, 1), 4, 2, a) for a in angles]
89

9-
a = subplot(111, aspect='equal')
10+
a = plt.subplot(111, aspect='equal')
1011

1112
for e in ells:
1213
e.set_clip_box(a.bbox)
1314
e.set_alpha(0.1)
1415
a.add_artist(e)
1516

16-
xlim(-2, 4)
17-
ylim(-1, 3)
17+
plt.xlim(-2, 4)
18+
plt.ylim(-1, 3)
1819

19-
show()
20+
plt.show()

0 commit comments

Comments
 (0)