Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit cdd9f6d

Browse filesBrowse files
committed
mep12 on ellipse_rotated.py
1 parent ee9e046 commit cdd9f6d
Copy full SHA for cdd9f6d

File tree

Expand file treeCollapse file tree

1 file changed

+7
-6
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+7
-6
lines changed
+7-6Lines 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 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.