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

Skip to content

Commit 111ebec

Browse files
committed
removed extraneous savefig calls from examples
svn path=/trunk/matplotlib/; revision=6535
1 parent 8abe219 commit 111ebec

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

73 files changed

+43
-122
lines changed

CHANGELOG

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
2008-12-08 Added mdehoon's native macosx backend from sf patch 2179017
1+
2008-12-08 Added mdehoon's native macosx backend from sf patch 2179017 - JDH
22

33
2008-12-08 Removed the prints in the set_*style commands. Return the
4-
list of pprinted strings instead
4+
list of pprinted strings instead - JDH
55

66
2008-12-08 Some of the changes Michael made to improve the output of
77
the property tables in the rest docs broke of made

examples/api/barchart_demo.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,5 +36,5 @@ def autolabel(rects):
3636

3737
autolabel(rects1)
3838
autolabel(rects2)
39-
#fig.savefig('barchart_demo')
39+
4040
plt.show()

examples/api/histogram_demo.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,5 +31,4 @@
3131
ax.set_ylim(0, 0.03)
3232
ax.grid(True)
3333

34-
#fig.savefig('histogram_demo',dpi=72)
3534
plt.show()

examples/api/logo2.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -67,18 +67,17 @@ def add_polar_bar():
6767

6868
for line in ax.get_ygridlines() + ax.get_xgridlines():
6969
line.set_lw(0.8)
70-
line.set_alpha(0.9)
70+
line.set_alpha(0.9)
7171
line.set_ls('-')
7272
line.set_color('0.5')
73-
73+
7474
ax.set_yticks(np.arange(1, 9, 2))
7575
ax.set_rmax(9)
7676

7777
if __name__ == '__main__':
7878
main_axes = add_math_background()
7979
add_polar_bar()
8080
add_matplotlib_text(main_axes)
81-
fig.savefig('logo2.png', facecolor=figcolor, edgecolor=figcolor, dpi=dpi)
8281
plt.show()
8382

8483

examples/api/watermark_image.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,4 @@
1818
ax.grid()
1919
fig.figimage(im, 10, 10)
2020

21-
#fig.savefig('watermarked', transparent=True)
22-
2321
plt.show()

examples/api/watermark_text.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,4 @@
1818
fontsize=50, color='gray',
1919
ha='right', va='bottom', alpha=0.5)
2020

21-
#fig.savefig('watermarked_text', transparent=True)
22-
23-
2421
plt.show()

examples/pylab_examples/agg_buffer_to_array.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,5 +20,4 @@
2020
fig2 = figure()
2121
ax2 = fig2.add_subplot(111, frameon=False)
2222
ax2.imshow(X)
23-
fig2.savefig('simple.png')
2423
show()

examples/pylab_examples/alignment_test.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,5 +78,5 @@
7878
transform=ax.transAxes)
7979

8080
axis('off')
81-
#savefig('alignment_test', dpi=100)
81+
8282
show()

examples/pylab_examples/annotation_demo.py

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,6 @@
8282
horizontalalignment='right', verticalalignment='bottom',
8383
fontsize=20)
8484

85-
#fig.savefig('annotation_coords')
8685

8786
if 1:
8887
# you can specify the xypoint and the xytext in different
@@ -111,7 +110,7 @@
111110
horizontalalignment='left',
112111
verticalalignment='bottom',
113112
)
114-
#fig.savefig('annotation_polar')
113+
115114

116115
if 1:
117116
# You can also use polar notation on a catesian axes. Here the
@@ -138,9 +137,5 @@
138137

139138
ax.set_xlim(-20, 20)
140139
ax.set_ylim(-20, 20)
141-
#fig.savefig('annotation_ellipse')
142-
143-
144140

145-
#fig.savefig('annotation_demo.png')
146141
show()

examples/pylab_examples/annotation_demo2.py

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -72,8 +72,6 @@
7272

7373

7474

75-
#fig.savefig('annotation_connection')
76-
7775

7876
if 1:
7977
fig = figure(2)
@@ -146,6 +144,4 @@
146144
)
147145
)
148146

149-
#fig.savefig('annotation_arrowstyle')
150-
151147
show()

examples/pylab_examples/arctest.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,6 @@ def f(t):
1313
l = plot(t1, f(t1), 'ro')
1414
setp(l, 'markersize', 30)
1515
setp(l, 'markerfacecolor', 'b')
16-
#savefig('arctest', dpi=150)
16+
1717
show()
1818

examples/pylab_examples/arrow_demo.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -308,6 +308,5 @@ def draw_arrow(pair, alpha=alpha, ec=ec, labelcolor=labelcolor):
308308
normalize_data=scaled, head_starts_at_zero=True, size=size)
309309

310310
draw()
311-
#savefig('arrows.png')
312-
#print 'Example saved to file "arrows.png"'
311+
313312
show()

examples/pylab_examples/axes_demo.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,5 @@
2828
title('Impulse response')
2929
setp(a, xlim=(0,.2), xticks=[], yticks=[])
3030

31-
#savefig('../figures/axes_demo.eps')
32-
#savefig('../figures/axes_demo.png')
31+
3332
show()

examples/pylab_examples/axes_props.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
setp(xticklabels, 'color', 'r', fontsize='medium')
2727

2828

29-
#savefig('axprops_demo')
29+
3030
show()
3131

3232

@@ -57,7 +57,6 @@
5757
label.set_color('r')
5858
label.set_fontsize('medium')
5959
60-
#savefig('axprops_demo')
6160
show()
6261
6362
"""

examples/pylab_examples/barchart_demo.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,5 +34,5 @@ def autolabel(rects):
3434

3535
autolabel(rects1)
3636
autolabel(rects2)
37-
#savefig('barchart_demo')
37+
3838
plt.show()

examples/pylab_examples/barcode_demo.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,6 @@
2121
ax = fig.add_axes([0.3, 0.1, 0.6, 0.1], **axprops)
2222
ax.imshow(x, **barprops)
2323

24-
#fig.savefig('barcode.png', dpi=100)
24+
2525
show()
2626

examples/pylab_examples/boxplot_demo.py

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -15,32 +15,26 @@
1515

1616
# basic plot
1717
boxplot(data)
18-
#savefig('box1')
1918

2019
# notched plot
2120
figure()
2221
boxplot(data,1)
23-
#savefig('box2')
2422

2523
# change outlier point symbols
2624
figure()
2725
boxplot(data,0,'gD')
28-
#savefig('box3')
2926

3027
# don't show outlier points
3128
figure()
3229
boxplot(data,0,'')
33-
#savefig('box4')
3430

3531
# horizontal boxes
3632
figure()
3733
boxplot(data,0,'rs',0)
38-
#savefig('box5')
3934

4035
# change whisker length
4136
figure()
4237
boxplot(data,0,'rs',0,0.75)
43-
#savefig('box6')
4438

4539
# fake up some more data
4640
spread= rand(50) * 100
@@ -59,7 +53,6 @@
5953
# multiple box plots on one figure
6054
figure()
6155
boxplot(data)
62-
#savefig('box7')
6356

6457
show()
6558

examples/pylab_examples/broken_barh.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,5 +20,4 @@
2020
fontsize=16,
2121
horizontalalignment='right', verticalalignment='top')
2222

23-
#fig.savefig('broken_barh', dpi=100)
2423
plt.show()

examples/pylab_examples/contour_demo.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,5 +101,4 @@
101101
CB.ax.set_position([ll, b+0.1*h, ww, h*0.8])
102102

103103

104-
#savefig('contour_demo')
105104
plt.show()

examples/pylab_examples/contour_image.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,5 @@
9898
setp(gca(), ylim=ylim[::-1])
9999
title("Image, origin from rc, reversed y-axis")
100100
colorbar(im)
101-
#savefig('contour_image')
102101

103102
show()

examples/pylab_examples/contourf_demo.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,5 @@
7676
clabel(CS4, fmt = '%2.1f', colors = 'w', fontsize=14)
7777
colorbar(CS3)
7878

79-
#savefig('contourf_demo')
8079
show()
8180

examples/pylab_examples/custom_figure_class.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@ def __init__(self, *args, **kwargs):
1616
fig = figure(FigureClass=MyFigure, figtitle='my title')
1717
ax = fig.add_subplot(111)
1818
ax.plot([1,2,3])
19-
fig.savefig('test.png')
20-
fig.savefig('test.ps')
19+
2120
show()
2221

examples/pylab_examples/customize_rc.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/usr/bin/env python
1+
22
"""
33
I'm not trying to make a good liking figure here, but just to show
44
some examples of customizing rc params on the fly
@@ -13,7 +13,7 @@ def set_pub():
1313
rc('tick', labelsize=15) # tick labels bigger
1414
rc('lines', lw=1, color='k') # thicker black lines (no budget for color!)
1515
rc('grid', c='0.5', ls='-', lw=0.5) # solid gray grid lines
16-
rc('#savefig', dpi=300) # higher res outputs
16+
rc('savefig', dpi=300) # higher res outputs
1717
1818
1919
@@ -22,7 +22,7 @@ def set_pub():
2222
>>> set_pub()
2323
>>> subplot(111)
2424
>>> plot([1,2,3])
25-
>>> #savefig('myfig')
25+
>>> savefig('myfig')
2626
>>> rcdefaults() # restore the defaults
2727
2828
"""

examples/pylab_examples/dannys_example.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,5 +56,4 @@
5656
pylab.text(0.2, 0.15, r'$\mathcal{F} = \int f\left( \phi, c \right) dV,$ \newline $ \frac{ \partial \phi } { \partial t } = -M_{ \phi } \frac{ \delta \mathcal{F} } { \delta \phi }$',
5757
{'color' : 'b', 'fontsize' : 20})
5858

59-
pylab.savefig('pfm-lsm.png')
6059
pylab.show()

examples/pylab_examples/dash_control.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,5 +10,5 @@
1010

1111
l, = plot(arange(20), '--')
1212
l.set_dashes(dashes)
13-
savefig('dash_control')
13+
1414
show()

examples/pylab_examples/dashpointlabel.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,6 @@
3535

3636
ax.set_xlim((0.0, 5.0))
3737
ax.set_ylim((0.0, 5.0))
38-
#if save:
39-
# pylab.savefig('dashpointlabel')
38+
4039
pylab.show()
4140

examples/pylab_examples/date_demo2.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,5 +43,4 @@
4343

4444
fig.autofmt_xdate()
4545

46-
#fig.savefig('date_demo2')
4746
show()

examples/pylab_examples/date_demo_rrule.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,5 +28,4 @@
2828
labels = ax.get_xticklabels()
2929
setp(labels, rotation=30, fontsize=10)
3030

31-
savefig('date_demo_rrule')
3231
show()

examples/pylab_examples/ellipse_demo.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,4 @@
1717
ax.set_xlim(0, 10)
1818
ax.set_ylim(0, 10)
1919

20-
#fig.savefig('ellipse_demo.eps')
21-
#fig.savefig('ellipse_demo.png')
22-
2320
show()

examples/pylab_examples/equal_aspect_ratio.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,4 @@
1717
axes().set_aspect('equal', 'datalim')
1818

1919

20-
#savefig('simple_plot.png')
21-
savefig('equal_aspect')
22-
2320
show()

examples/pylab_examples/errorbar_demo.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,5 +43,4 @@
4343
ax.set_yscale('log')
4444
errorbar(t, s+2, e, f, fmt='o') # both symmetric
4545

46-
#savefig('errorbar_demo')
4746
show()

examples/pylab_examples/figimage_demo.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,6 @@
1515
im1 = plt.figimage(Z, xo=50, yo=0, cmap=cm.jet, origin='lower')
1616
im2 = plt.figimage(Z, xo=100, yo=100, alpha=.8, cmap=cm.jet, origin='lower')
1717

18-
#fig.savefig('figimage_demo.png')
19-
#fig.savefig('figimage_demo.svg')
20-
#fig.savefig('figimage_demo.pdf')
2118
plt.show()
2219

2320

examples/pylab_examples/figure_title.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,5 @@ def f(t):
2525
title('subplot 2')
2626
ylabel('Undamped')
2727

28-
#savefig('figtext')
2928
show()
3029

examples/pylab_examples/fonts_demo.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,5 +111,5 @@
111111
**alignment)
112112

113113
axis([-1,1,0,1])
114-
#savefig('fonts_demo')
114+
115115
show()

examples/pylab_examples/fonts_demo_kw.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,5 +80,5 @@
8080
**alignment)
8181

8282
axis([-1, 1, 0, 1])
83-
#savefig('fonts_demo_kw')
83+
8484
show()

examples/pylab_examples/hline_demo.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ def f(t):
1717
plt.hlines(t, [0], s, lw=2)
1818
plt.xlabel('time (s)')
1919
plt.title('Comparison of model with data')
20-
plt.savefig('test')
20+
2121
plt.xlim(xmin=0)
2222
plt.show()
2323

examples/pylab_examples/image_demo2.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,5 @@
2828
ylabel('density')
2929
setp(gca(), 'xticklabels', [])
3030

31-
#savefig('image_demo2')
3231
show()
3332

examples/pylab_examples/image_demo3.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,5 @@
1414
ax.set_axis_off()
1515
im = imshow(lena, origin='lower')
1616

17-
#savefig('image_demo3')
1817
show()
1918

examples/pylab_examples/image_interp.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -50,17 +50,14 @@
5050
A = rand(5,5)
5151
figure(1)
5252
imshow(A, interpolation='nearest')
53-
savefig('agg_nearest')
5453
grid(True)
5554

5655
figure(2)
5756
imshow(A, interpolation='bilinear')
58-
savefig('agg_bilinear')
5957
grid(True)
6058

6159
figure(3)
6260
imshow(A, interpolation='bicubic')
63-
savefig('agg_bicubic')
6461
grid(True)
6562

6663
show()

0 commit comments

Comments
 (0)