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

Skip to content

Commit e25ff2b

Browse files
committed
users guide and htdocs updates
svn path=/trunk/matplotlib/; revision=3311
1 parent 3d631bf commit e25ff2b

2 files changed

Lines changed: 17 additions & 8 deletions

File tree

CODING_GUIDE

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,12 @@ and standards. Please edit and extend this document.
55

66
== svn checkouts ==
77

8+
# checking out the main src
89
svn co https://svn.sourceforge.net/svnroot/matplotlib/trunk/matplotlib matplotlib
910

11+
# checking out everything (toolkits, user's guide, htdocs, etc..)
12+
svn co https://svn.sourceforge.net/svnroot/matplotlib/trunk matplotlib
13+
1014
== Committing changes ==
1115

1216
When committing changes to matplotlib, there are a few things to bear

examples/ellipse_demo.py

Lines changed: 13 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,24 @@
1-
from pylab import *
1+
from pylab import figure, show, nx
22
from matplotlib.patches import Ellipse
3+
rand = nx.mlab.rand
34

45
NUM = 250
56

6-
ells = [Ellipse(rand(2)*10, rand(), rand(), rand()*360) for i in xrange(NUM)]
7+
ells = [Ellipse(xy=rand(2)*10, width=rand(), height=rand(), angle=rand()*360)
8+
for i in xrange(NUM)]
79

8-
a = subplot(111, aspect='equal')
10+
fig = figure()
11+
ax = fig.add_subplot(111, aspect='equal')
912
for e in ells:
10-
a.add_artist(e)
11-
e.set_clip_box(a.bbox)
13+
ax.add_artist(e)
14+
e.set_clip_box(ax.bbox)
1215
e.set_alpha(rand())
1316
e.set_facecolor(rand(3))
1417

15-
xlim(0, 10)
16-
ylim(0, 10)
18+
ax.set_xlim(0, 10)
19+
ax.set_ylim(0, 10)
20+
21+
fig.savefig('../figures/ellipse_demo.eps')
22+
fig.savefig('../figures/ellipse_demo.png')
1723

18-
savefig('ellipse_demo')
1924
show()

0 commit comments

Comments
 (0)