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

Skip to content

Commit 335e5be

Browse files
committed
restored the support for multiple pyplots that I broke earlier
svn path=/trunk/matplotlib/; revision=6288
1 parent 529c88e commit 335e5be

6 files changed

Lines changed: 34 additions & 36 deletions

File tree

API_CHANGES

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
1-
21
Changes for 0.98.x
32
==================
4-
3+
4+
* Restored 0.91 behavior of get_xlim/ylim returning a tuple
5+
rather than array - JDH
6+
57
* AFM.get_fullname() and get_familyname() no longer raise an
68
exception if the AFM file does not specify these optional attributes,
79
but returns a guess based on the required FontName attribute.

CHANGELOG

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,15 @@
1+
2008-10-21 Restored 0.91 behavior of get_xlim/ylim returning a tuple
2+
rather than array - JDH
3+
14
2008-10-20 Added image thumbnail generating function
25
matplotlib.image.thumbnail. See
36
examples/misc/image_thumbnail.py - JDH
47

58
2008-10-20 Applied scatleg patch based on ideas and work by Erik
69
Tollerud and Jae-Joon Lee. - MM
710

8-
2008-10-11 Fixed bug in pdf backend: if you pass a file object for
9-
output instead of a filename, e.g. in a wep app, we now
11+
2008-10-11 Fixed bug in pdf backend: if you pass a file object for
12+
output instead of a filename, e.g. in a wep app, we now
1013
flush the object at the end. - JKS
1114

1215
2008-10-08 Add path simplification support to paths with gaps. - EF

doc/_templates/gallery.html

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ <h3>Click on any image to see full size image and source code</h3>
2323

2424
<a href="examples/api/date_demo.html"><img src="_static/plot_directive/mpl_examples/api/thumbnails/date_demo.png" border="0" alt="date_demo"/></a>
2525

26-
<a href="examples/api/date_index_formatter.html"><img src="_static/plot_directive/mpl_examples/api/thumbnails/date_index_formatter.png" border="0" alt="date_index_formatter"/></a>
26+
<a href="examples/api/date_index_formatter.html"><img src="_static/plot_directive/mpl_examples/api/thumbnails/date_index_formatter_00.png" border="0" alt="date_index_formatter"/></a>
2727

2828
<a href="examples/api/date_index_formatter.html"><img src="_static/plot_directive/mpl_examples/api/thumbnails/date_index_formatter_01.png" border="0" alt="date_index_formatter"/></a>
2929

@@ -57,13 +57,13 @@ <h3>Click on any image to see full size image and source code</h3>
5757

5858
<a href="examples/pylab_examples/accented_text.html"><img src="_static/plot_directive/mpl_examples/pylab_examples/thumbnails/accented_text.png" border="0" alt="accented_text"/></a>
5959

60-
<a href="examples/pylab_examples/agg_buffer_to_array.html"><img src="_static/plot_directive/mpl_examples/pylab_examples/thumbnails/agg_buffer_to_array.png" border="0" alt="agg_buffer_to_array"/></a>
60+
<a href="examples/pylab_examples/agg_buffer_to_array.html"><img src="_static/plot_directive/mpl_examples/pylab_examples/thumbnails/agg_buffer_to_array_00.png" border="0" alt="agg_buffer_to_array"/></a>
6161

6262
<a href="examples/pylab_examples/agg_buffer_to_array.html"><img src="_static/plot_directive/mpl_examples/pylab_examples/thumbnails/agg_buffer_to_array_01.png" border="0" alt="agg_buffer_to_array"/></a>
6363

6464
<a href="examples/pylab_examples/alignment_test.html"><img src="_static/plot_directive/mpl_examples/pylab_examples/thumbnails/alignment_test.png" border="0" alt="alignment_test"/></a>
6565

66-
<a href="examples/pylab_examples/annotation_demo.html"><img src="_static/plot_directive/mpl_examples/pylab_examples/thumbnails/annotation_demo.png" border="0" alt="annotation_demo"/></a>
66+
<a href="examples/pylab_examples/annotation_demo.html"><img src="_static/plot_directive/mpl_examples/pylab_examples/thumbnails/annotation_demo_00.png" border="0" alt="annotation_demo"/></a>
6767

6868
<a href="examples/pylab_examples/annotation_demo.html"><img src="_static/plot_directive/mpl_examples/pylab_examples/thumbnails/annotation_demo_01.png" border="0" alt="annotation_demo"/></a>
6969

@@ -91,11 +91,11 @@ <h3>Click on any image to see full size image and source code</h3>
9191

9292
<a href="examples/pylab_examples/barcode_demo.html"><img src="_static/plot_directive/mpl_examples/pylab_examples/thumbnails/barcode_demo.png" border="0" alt="barcode_demo"/></a>
9393

94-
<a href="examples/pylab_examples/barh_demo.html"><img src="_static/plot_directive/mpl_examples/pylab_examples/thumbnails/barh_demo.png" border="0" alt="barh_demo"/></a>
94+
<a href="examples/pylab_examples/barh_demo.html"><img src="_static/plot_directive/mpl_examples/pylab_examples/thumbnails/barh_demo_00.png" border="0" alt="barh_demo"/></a>
9595

9696
<a href="examples/pylab_examples/barh_demo.html"><img src="_static/plot_directive/mpl_examples/pylab_examples/thumbnails/barh_demo_01.png" border="0" alt="barh_demo"/></a>
9797

98-
<a href="examples/pylab_examples/boxplot_demo.html"><img src="_static/plot_directive/mpl_examples/pylab_examples/thumbnails/boxplot_demo.png" border="0" alt="boxplot_demo"/></a>
98+
<a href="examples/pylab_examples/boxplot_demo.html"><img src="_static/plot_directive/mpl_examples/pylab_examples/thumbnails/boxplot_demo_00.png" border="0" alt="boxplot_demo"/></a>
9999

100100
<a href="examples/pylab_examples/boxplot_demo.html"><img src="_static/plot_directive/mpl_examples/pylab_examples/thumbnails/boxplot_demo_01.png" border="0" alt="boxplot_demo"/></a>
101101

@@ -121,7 +121,7 @@ <h3>Click on any image to see full size image and source code</h3>
121121

122122
<a href="examples/pylab_examples/color_demo.html"><img src="_static/plot_directive/mpl_examples/pylab_examples/thumbnails/color_demo.png" border="0" alt="color_demo"/></a>
123123

124-
<a href="examples/pylab_examples/contour_demo.html"><img src="_static/plot_directive/mpl_examples/pylab_examples/thumbnails/contour_demo.png" border="0" alt="contour_demo"/></a>
124+
<a href="examples/pylab_examples/contour_demo.html"><img src="_static/plot_directive/mpl_examples/pylab_examples/thumbnails/contour_demo_00.png" border="0" alt="contour_demo"/></a>
125125

126126
<a href="examples/pylab_examples/contour_demo.html"><img src="_static/plot_directive/mpl_examples/pylab_examples/thumbnails/contour_demo_01.png" border="0" alt="contour_demo"/></a>
127127

@@ -133,11 +133,11 @@ <h3>Click on any image to see full size image and source code</h3>
133133

134134
<a href="examples/pylab_examples/contour_image.html"><img src="_static/plot_directive/mpl_examples/pylab_examples/thumbnails/contour_image.png" border="0" alt="contour_image"/></a>
135135

136-
<a href="examples/pylab_examples/contour_label_demo.html"><img src="_static/plot_directive/mpl_examples/pylab_examples/thumbnails/contour_label_demo.png" border="0" alt="contour_label_demo"/></a>
136+
<a href="examples/pylab_examples/contour_label_demo.html"><img src="_static/plot_directive/mpl_examples/pylab_examples/thumbnails/contour_label_demo_00.png" border="0" alt="contour_label_demo"/></a>
137137

138138
<a href="examples/pylab_examples/contour_label_demo.html"><img src="_static/plot_directive/mpl_examples/pylab_examples/thumbnails/contour_label_demo_01.png" border="0" alt="contour_label_demo"/></a>
139139

140-
<a href="examples/pylab_examples/contourf_demo.html"><img src="_static/plot_directive/mpl_examples/pylab_examples/thumbnails/contourf_demo.png" border="0" alt="contourf_demo"/></a>
140+
<a href="examples/pylab_examples/contourf_demo.html"><img src="_static/plot_directive/mpl_examples/pylab_examples/thumbnails/contourf_demo_00.png" border="0" alt="contourf_demo"/></a>
141141

142142
<a href="examples/pylab_examples/contourf_demo.html"><img src="_static/plot_directive/mpl_examples/pylab_examples/thumbnails/contourf_demo_01.png" border="0" alt="contourf_demo"/></a>
143143

@@ -181,7 +181,7 @@ <h3>Click on any image to see full size image and source code</h3>
181181

182182
<a href="examples/pylab_examples/equal_aspect_ratio.html"><img src="_static/plot_directive/mpl_examples/pylab_examples/thumbnails/equal_aspect_ratio.png" border="0" alt="equal_aspect_ratio"/></a>
183183

184-
<a href="examples/pylab_examples/errorbar_demo.html"><img src="_static/plot_directive/mpl_examples/pylab_examples/thumbnails/errorbar_demo.png" border="0" alt="errorbar_demo"/></a>
184+
<a href="examples/pylab_examples/errorbar_demo.html"><img src="_static/plot_directive/mpl_examples/pylab_examples/thumbnails/errorbar_demo_00.png" border="0" alt="errorbar_demo"/></a>
185185

186186
<a href="examples/pylab_examples/errorbar_demo.html"><img src="_static/plot_directive/mpl_examples/pylab_examples/thumbnails/errorbar_demo_01.png" border="0" alt="errorbar_demo"/></a>
187187

@@ -201,7 +201,7 @@ <h3>Click on any image to see full size image and source code</h3>
201201

202202
<a href="examples/pylab_examples/errorbar_demo.html"><img src="_static/plot_directive/mpl_examples/pylab_examples/thumbnails/errorbar_demo_09.png" border="0" alt="errorbar_demo"/></a>
203203

204-
<a href="examples/pylab_examples/errorbar_limits.html"><img src="_static/plot_directive/mpl_examples/pylab_examples/thumbnails/errorbar_limits.png" border="0" alt="errorbar_limits"/></a>
204+
<a href="examples/pylab_examples/errorbar_limits.html"><img src="_static/plot_directive/mpl_examples/pylab_examples/thumbnails/errorbar_limits_00.png" border="0" alt="errorbar_limits"/></a>
205205

206206
<a href="examples/pylab_examples/errorbar_limits.html"><img src="_static/plot_directive/mpl_examples/pylab_examples/thumbnails/errorbar_limits_01.png" border="0" alt="errorbar_limits"/></a>
207207

@@ -253,7 +253,7 @@ <h3>Click on any image to see full size image and source code</h3>
253253

254254
<a href="examples/pylab_examples/histogram_demo.html"><img src="_static/plot_directive/mpl_examples/pylab_examples/thumbnails/histogram_demo.png" border="0" alt="histogram_demo"/></a>
255255

256-
<a href="examples/pylab_examples/histogram_demo_extended.html"><img src="_static/plot_directive/mpl_examples/pylab_examples/thumbnails/histogram_demo_extended.png" border="0" alt="histogram_demo_extended"/></a>
256+
<a href="examples/pylab_examples/histogram_demo_extended.html"><img src="_static/plot_directive/mpl_examples/pylab_examples/thumbnails/histogram_demo_extended_00.png" border="0" alt="histogram_demo_extended"/></a>
257257

258258
<a href="examples/pylab_examples/histogram_demo_extended.html"><img src="_static/plot_directive/mpl_examples/pylab_examples/thumbnails/histogram_demo_extended_01.png" border="0" alt="histogram_demo_extended"/></a>
259259

@@ -273,7 +273,7 @@ <h3>Click on any image to see full size image and source code</h3>
273273

274274
<a href="examples/pylab_examples/image_demo3.html"><img src="_static/plot_directive/mpl_examples/pylab_examples/thumbnails/image_demo3.png" border="0" alt="image_demo3"/></a>
275275

276-
<a href="examples/pylab_examples/image_interp.html"><img src="_static/plot_directive/mpl_examples/pylab_examples/thumbnails/image_interp.png" border="0" alt="image_interp"/></a>
276+
<a href="examples/pylab_examples/image_interp.html"><img src="_static/plot_directive/mpl_examples/pylab_examples/thumbnails/image_interp_00.png" border="0" alt="image_interp"/></a>
277277

278278
<a href="examples/pylab_examples/image_interp.html"><img src="_static/plot_directive/mpl_examples/pylab_examples/thumbnails/image_interp_01.png" border="0" alt="image_interp"/></a>
279279

@@ -295,7 +295,7 @@ <h3>Click on any image to see full size image and source code</h3>
295295

296296
<a href="examples/pylab_examples/layer_images.html"><img src="_static/plot_directive/mpl_examples/pylab_examples/thumbnails/layer_images.png" border="0" alt="layer_images"/></a>
297297

298-
<a href="examples/pylab_examples/legend_auto.html"><img src="_static/plot_directive/mpl_examples/pylab_examples/thumbnails/legend_auto.png" border="0" alt="legend_auto"/></a>
298+
<a href="examples/pylab_examples/legend_auto.html"><img src="_static/plot_directive/mpl_examples/pylab_examples/thumbnails/legend_auto_00.png" border="0" alt="legend_auto"/></a>
299299

300300
<a href="examples/pylab_examples/legend_auto.html"><img src="_static/plot_directive/mpl_examples/pylab_examples/thumbnails/legend_auto_01.png" border="0" alt="legend_auto"/></a>
301301

@@ -349,7 +349,7 @@ <h3>Click on any image to see full size image and source code</h3>
349349

350350
<a href="examples/pylab_examples/mathtext_demo.html"><img src="_static/plot_directive/mpl_examples/pylab_examples/thumbnails/mathtext_demo.png" border="0" alt="mathtext_demo"/></a>
351351

352-
<a href="examples/pylab_examples/matshow.html"><img src="_static/plot_directive/mpl_examples/pylab_examples/thumbnails/matshow.png" border="0" alt="matshow"/></a>
352+
<a href="examples/pylab_examples/matshow.html"><img src="_static/plot_directive/mpl_examples/pylab_examples/thumbnails/matshow_00.png" border="0" alt="matshow"/></a>
353353

354354
<a href="examples/pylab_examples/matshow.html"><img src="_static/plot_directive/mpl_examples/pylab_examples/thumbnails/matshow_01.png" border="0" alt="matshow"/></a>
355355

@@ -363,13 +363,13 @@ <h3>Click on any image to see full size image and source code</h3>
363363

364364
<a href="examples/pylab_examples/multiline.html"><img src="_static/plot_directive/mpl_examples/pylab_examples/thumbnails/multiline.png" border="0" alt="multiline"/></a>
365365

366-
<a href="examples/pylab_examples/multiple_figs_demo.html"><img src="_static/plot_directive/mpl_examples/pylab_examples/thumbnails/multiple_figs_demo.png" border="0" alt="multiple_figs_demo"/></a>
366+
<a href="examples/pylab_examples/multiple_figs_demo.html"><img src="_static/plot_directive/mpl_examples/pylab_examples/thumbnails/multiple_figs_demo_00.png" border="0" alt="multiple_figs_demo"/></a>
367367

368368
<a href="examples/pylab_examples/multiple_figs_demo.html"><img src="_static/plot_directive/mpl_examples/pylab_examples/thumbnails/multiple_figs_demo_01.png" border="0" alt="multiple_figs_demo"/></a>
369369

370370
<a href="examples/pylab_examples/nan_test.html"><img src="_static/plot_directive/mpl_examples/pylab_examples/thumbnails/nan_test.png" border="0" alt="nan_test"/></a>
371371

372-
<a href="examples/pylab_examples/newscalarformatter_demo.html"><img src="_static/plot_directive/mpl_examples/pylab_examples/thumbnails/newscalarformatter_demo.png" border="0" alt="newscalarformatter_demo"/></a>
372+
<a href="examples/pylab_examples/newscalarformatter_demo.html"><img src="_static/plot_directive/mpl_examples/pylab_examples/thumbnails/newscalarformatter_demo_00.png" border="0" alt="newscalarformatter_demo"/></a>
373373

374374
<a href="examples/pylab_examples/newscalarformatter_demo.html"><img src="_static/plot_directive/mpl_examples/pylab_examples/thumbnails/newscalarformatter_demo_01.png" border="0" alt="newscalarformatter_demo"/></a>
375375

@@ -387,7 +387,7 @@ <h3>Click on any image to see full size image and source code</h3>
387387

388388
<a href="examples/pylab_examples/pie_demo.html"><img src="_static/plot_directive/mpl_examples/pylab_examples/thumbnails/pie_demo.png" border="0" alt="pie_demo"/></a>
389389

390-
<a href="examples/pylab_examples/plotfile_demo.html"><img src="_static/plot_directive/mpl_examples/pylab_examples/thumbnails/plotfile_demo.png" border="0" alt="plotfile_demo"/></a>
390+
<a href="examples/pylab_examples/plotfile_demo.html"><img src="_static/plot_directive/mpl_examples/pylab_examples/thumbnails/plotfile_demo_00.png" border="0" alt="plotfile_demo"/></a>
391391

392392
<a href="examples/pylab_examples/plotfile_demo.html"><img src="_static/plot_directive/mpl_examples/pylab_examples/thumbnails/plotfile_demo_01.png" border="0" alt="plotfile_demo"/></a>
393393

@@ -413,7 +413,7 @@ <h3>Click on any image to see full size image and source code</h3>
413413

414414
<a href="examples/pylab_examples/quadmesh_demo.html"><img src="_static/plot_directive/mpl_examples/pylab_examples/thumbnails/quadmesh_demo.png" border="0" alt="quadmesh_demo"/></a>
415415

416-
<a href="examples/pylab_examples/quiver_demo.html"><img src="_static/plot_directive/mpl_examples/pylab_examples/thumbnails/quiver_demo.png" border="0" alt="quiver_demo"/></a>
416+
<a href="examples/pylab_examples/quiver_demo.html"><img src="_static/plot_directive/mpl_examples/pylab_examples/thumbnails/quiver_demo_00.png" border="0" alt="quiver_demo"/></a>
417417

418418
<a href="examples/pylab_examples/quiver_demo.html"><img src="_static/plot_directive/mpl_examples/pylab_examples/thumbnails/quiver_demo_01.png" border="0" alt="quiver_demo"/></a>
419419

@@ -455,7 +455,7 @@ <h3>Click on any image to see full size image and source code</h3>
455455

456456
<a href="examples/pylab_examples/subplot_demo.html"><img src="_static/plot_directive/mpl_examples/pylab_examples/thumbnails/subplot_demo.png" border="0" alt="subplot_demo"/></a>
457457

458-
<a href="examples/pylab_examples/subplot_toolbar.html"><img src="_static/plot_directive/mpl_examples/pylab_examples/thumbnails/subplot_toolbar.png" border="0" alt="subplot_toolbar"/></a>
458+
<a href="examples/pylab_examples/subplot_toolbar.html"><img src="_static/plot_directive/mpl_examples/pylab_examples/thumbnails/subplot_toolbar_00.png" border="0" alt="subplot_toolbar"/></a>
459459

460460
<a href="examples/pylab_examples/subplot_toolbar.html"><img src="_static/plot_directive/mpl_examples/pylab_examples/thumbnails/subplot_toolbar_01.png" border="0" alt="subplot_toolbar"/></a>
461461

@@ -489,7 +489,7 @@ <h3>Click on any image to see full size image and source code</h3>
489489

490490
<a href="examples/pylab_examples/xcorr_demo.html"><img src="_static/plot_directive/mpl_examples/pylab_examples/thumbnails/xcorr_demo.png" border="0" alt="xcorr_demo"/></a>
491491

492-
<a href="examples/pylab_examples/zorder_demo.html"><img src="_static/plot_directive/mpl_examples/pylab_examples/thumbnails/zorder_demo.png" border="0" alt="zorder_demo"/></a>
492+
<a href="examples/pylab_examples/zorder_demo.html"><img src="_static/plot_directive/mpl_examples/pylab_examples/thumbnails/zorder_demo_00.png" border="0" alt="zorder_demo"/></a>
493493

494494
<a href="examples/pylab_examples/zorder_demo.html"><img src="_static/plot_directive/mpl_examples/pylab_examples/thumbnails/zorder_demo_01.png" border="0" alt="zorder_demo"/></a>
495495

doc/make.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,6 @@ def check_build():
1717
def sf():
1818
'push a copy to the sf site'
1919
os.system('cd build/html; rsync -avz . jdh2358,[email protected]:/home/groups/m/ma/matplotlib/htdocs/ -essh --cvs-exclude')
20-
# we are now doing this in the doc/examples build
21-
#os.system('cd ~/mpl/examples; svn-clean; cd ..; rsync -avz examples jdh2358,[email protected]:/home/groups/m/ma/matplotlib/htdocs/ -essh --cvs-exclude --delete')
2220

2321
def sfpdf():
2422
'push a copy to the sf site'

doc/sphinxext/plot_directive.py

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -127,12 +127,7 @@ def makefig(fullpath, outdir):
127127
while True:
128128
all_exists = True
129129
for format, dpi in formats:
130-
if i==0:
131-
outname = basename
132-
else:
133-
outname = "%s_%02d" % (basename, i)
134-
135-
outname = os.path.join(outdir, '%s.%s' % (outname, format))
130+
outname = os.path.join(outdir, '%s_%02d.%s' % (basename, i, format))
136131
if out_of_date(fullpath, outname):
137132
all_exists = False
138133
break
@@ -163,7 +158,7 @@ def makefig(fullpath, outdir):
163158
fig_managers = _pylab_helpers.Gcf.get_all_fig_managers()
164159
for i, figman in enumerate(fig_managers):
165160
for format, dpi in formats:
166-
if i==0:
161+
if len(fig_managers) == 1:
167162
outname = basename
168163
else:
169164
outname = "%s_%02d" % (basename, i)
@@ -221,7 +216,7 @@ def run(arguments, options, state_machine, lineno):
221216
options = "\n".join(options)
222217

223218
for i in range(num_figs):
224-
if i==0:
219+
if num_figs == 1:
225220
outname = basename
226221
else:
227222
outname = "%s_%02d" % (basename, i)

lib/matplotlib/axes.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1771,7 +1771,7 @@ def get_xlim(self):
17711771
"""
17721772
Get the x-axis range [*xmin*, *xmax*]
17731773
"""
1774-
return self.viewLim.intervalx
1774+
return tuple(self.viewLim.intervalx)
17751775

17761776
def set_xlim(self, xmin=None, xmax=None, emit=True, **kwargs):
17771777
"""
@@ -1944,7 +1944,7 @@ def get_ylim(self):
19441944
"""
19451945
Get the y-axis range [*ymin*, *ymax*]
19461946
"""
1947-
return self.viewLim.intervaly
1947+
return tuple(self.viewLim.intervaly)
19481948

19491949
def set_ylim(self, ymin=None, ymax=None, emit=True, **kwargs):
19501950
"""

0 commit comments

Comments
 (0)