You can subscribe to this list here.
2007 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
(115) |
Aug
(120) |
Sep
(137) |
Oct
(170) |
Nov
(461) |
Dec
(263) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2008 |
Jan
(120) |
Feb
(74) |
Mar
(35) |
Apr
(74) |
May
(245) |
Jun
(356) |
Jul
(240) |
Aug
(115) |
Sep
(78) |
Oct
(225) |
Nov
(98) |
Dec
(271) |
2009 |
Jan
(132) |
Feb
(84) |
Mar
(74) |
Apr
(56) |
May
(90) |
Jun
(79) |
Jul
(83) |
Aug
(296) |
Sep
(214) |
Oct
(76) |
Nov
(82) |
Dec
(66) |
2010 |
Jan
(46) |
Feb
(58) |
Mar
(51) |
Apr
(77) |
May
(58) |
Jun
(126) |
Jul
(128) |
Aug
(64) |
Sep
(50) |
Oct
(44) |
Nov
(48) |
Dec
(54) |
2011 |
Jan
(68) |
Feb
(52) |
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
(1) |
2018 |
Jan
|
Feb
|
Mar
|
Apr
|
May
(1) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
S | M | T | W | T | F | S |
---|---|---|---|---|---|---|
|
|
1
(3) |
2
|
3
|
4
(1) |
5
|
6
(1) |
7
(2) |
8
(22) |
9
(8) |
10
(24) |
11
(3) |
12
(4) |
13
|
14
(3) |
15
(3) |
16
(1) |
17
(2) |
18
(6) |
19
|
20
|
21
(3) |
22
(2) |
23
(8) |
24
(1) |
25
|
26
(6) |
27
(1) |
28
(3) |
29
(4) |
30
|
31
(9) |
|
|
Revision: 4893 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=4893&view=rev Author: efiring Date: 2008年01月23日 14:35:10 -0800 (2008年1月23日) Log Message: ----------- streamline handling of masked values in Path.__init__ Modified Paths: -------------- trunk/matplotlib/lib/matplotlib/path.py Modified: trunk/matplotlib/lib/matplotlib/path.py =================================================================== --- trunk/matplotlib/lib/matplotlib/path.py 2008年01月23日 20:33:27 UTC (rev 4892) +++ trunk/matplotlib/lib/matplotlib/path.py 2008年01月23日 22:35:10 UTC (rev 4893) @@ -101,7 +101,7 @@ mask = ma.nomask if codes is not None: - codes = npy.asarray(codes, self.code_type) + codes = npy.asarray(codes, self.code_type) assert codes.ndim == 1 assert len(codes) == len(vertices) @@ -112,17 +112,15 @@ # MOVETO commands to the codes array accordingly. if is_mask: if mask is not ma.nomask: - mask1d = ma.mask_or(mask[:, 0], mask[:, 1]) + mask1d = npy.logical_or.reduce(mask, axis=1) + gmask1d = npy.invert(mask1d) if codes is None: - codes = self.LINETO * npy.ones( - len(vertices), self.code_type) + codes = npy.empty((len(vertices)), self.code_type) + codes.fill(self.LINETO) codes[0] = self.MOVETO - vertices = npy.compress(npy.invert(mask1d), vertices, 0) - vertices = npy.asarray(vertices) - codes = npy.where(npy.concatenate((mask1d[-1:], mask1d[:-1])), - self.MOVETO, codes) - codes = ma.masked_array(codes, mask=mask1d).compressed() - codes = npy.asarray(codes, self.code_type) + vertices = vertices[gmask1d].filled() # ndarray + codes[npy.roll(mask1d, 1)] = self.MOVETO + codes = codes[gmask1d] # npy.compress is much slower else: vertices = npy.asarray(vertices, npy.float_) @@ -130,7 +128,7 @@ assert vertices.shape[1] == 2 self.codes = codes - self.vertices = vertices + self.vertices = vertices #@staticmethod def make_compound_path(*args): This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
Revision: 4892 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=4892&view=rev Author: mdboom Date: 2008年01月23日 12:33:27 -0800 (2008年1月23日) Log Message: ----------- Fix exception with maskedarray branch of numpy (Thanks, David Huard) Modified Paths: -------------- trunk/matplotlib/lib/matplotlib/path.py Modified: trunk/matplotlib/lib/matplotlib/path.py =================================================================== --- trunk/matplotlib/lib/matplotlib/path.py 2008年01月23日 19:12:41 UTC (rev 4891) +++ trunk/matplotlib/lib/matplotlib/path.py 2008年01月23日 20:33:27 UTC (rev 4892) @@ -117,7 +117,7 @@ codes = self.LINETO * npy.ones( len(vertices), self.code_type) codes[0] = self.MOVETO - vertices = ma.compress(npy.invert(mask1d), vertices, 0) + vertices = npy.compress(npy.invert(mask1d), vertices, 0) vertices = npy.asarray(vertices) codes = npy.where(npy.concatenate((mask1d[-1:], mask1d[:-1])), self.MOVETO, codes) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
Revision: 4891 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=4891&view=rev Author: mdboom Date: 2008年01月23日 11:12:41 -0800 (2008年1月23日) Log Message: ----------- Fix warnings on gcc 4.2.1 Modified Paths: -------------- trunk/matplotlib/src/_backend_agg.cpp trunk/matplotlib/src/_image.cpp Modified: trunk/matplotlib/src/_backend_agg.cpp =================================================================== --- trunk/matplotlib/src/_backend_agg.cpp 2008年01月23日 18:27:05 UTC (rev 4890) +++ trunk/matplotlib/src/_backend_agg.cpp 2008年01月23日 19:12:41 UTC (rev 4891) @@ -1300,7 +1300,7 @@ PyObject* write_method = PyObject_GetAttrString(py_file_obj, "write"); PyObject* result = NULL; if (write_method) - result = PyObject_CallFunction(write_method, "s#", data, length); + result = PyObject_CallFunction(write_method, (char *)"s#", data, length); Py_XDECREF(write_method); Py_XDECREF(result); } @@ -1310,7 +1310,7 @@ PyObject* flush_method = PyObject_GetAttrString(py_file_obj, "flush"); PyObject* result = NULL; if (flush_method) - result = PyObject_CallFunction(flush_method, ""); + result = PyObject_CallFunction(flush_method, (char *)""); Py_XDECREF(flush_method); Py_XDECREF(result); } Modified: trunk/matplotlib/src/_image.cpp =================================================================== --- trunk/matplotlib/src/_image.cpp 2008年01月23日 18:27:05 UTC (rev 4890) +++ trunk/matplotlib/src/_image.cpp 2008年01月23日 19:12:41 UTC (rev 4891) @@ -580,7 +580,7 @@ PyObject* write_method = PyObject_GetAttrString(py_file_obj, "write"); PyObject* result = NULL; if (write_method) - result = PyObject_CallFunction(write_method, "s#", data, length); + result = PyObject_CallFunction(write_method, (char *)"s#", data, length); Py_XDECREF(write_method); Py_XDECREF(result); } @@ -590,7 +590,7 @@ PyObject* flush_method = PyObject_GetAttrString(py_file_obj, "flush"); PyObject* result = NULL; if (flush_method) - result = PyObject_CallFunction(flush_method, ""); + result = PyObject_CallFunction(flush_method, (char *)""); Py_XDECREF(flush_method); Py_XDECREF(result); } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
Revision: 4890 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=4890&view=rev Author: mdboom Date: 2008年01月23日 10:27:05 -0800 (2008年1月23日) Log Message: ----------- Fix relim again (thanks Darren Dale) Modified Paths: -------------- trunk/matplotlib/lib/matplotlib/axes.py Modified: trunk/matplotlib/lib/matplotlib/axes.py =================================================================== --- trunk/matplotlib/lib/matplotlib/axes.py 2008年01月23日 18:13:40 UTC (rev 4889) +++ trunk/matplotlib/lib/matplotlib/axes.py 2008年01月23日 18:27:05 UTC (rev 4890) @@ -1200,12 +1200,11 @@ def relim(self): 'recompute the datalimits based on current artists' self.dataLim.ignore(True) + self.ignore_existing_data_limits = True for line in self.lines: - self.ignore_existing_data_limits = True self._update_line_limits(line) for p in self.patches: - self.ignore_existing_data_limits = True self._update_patch_limits(p) def update_datalim(self, xys): This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
Revision: 4889 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=4889&view=rev Author: mdboom Date: 2008年01月23日 10:13:40 -0800 (2008年1月23日) Log Message: ----------- Remove an accidental printf. Modified Paths: -------------- trunk/matplotlib/src/_backend_agg.cpp Modified: trunk/matplotlib/src/_backend_agg.cpp =================================================================== --- trunk/matplotlib/src/_backend_agg.cpp 2008年01月23日 14:35:21 UTC (rev 4888) +++ trunk/matplotlib/src/_backend_agg.cpp 2008年01月23日 18:13:40 UTC (rev 4889) @@ -929,7 +929,8 @@ PyArrayObject* edgecolors = NULL; try { - offsets = (PyArrayObject*)PyArray_FromObject(offsets_obj.ptr(), PyArray_DOUBLE, 0, 2); + offsets = (PyArrayObject*)PyArray_FromObject + (offsets_obj.ptr(), PyArray_DOUBLE, 0, 2); if (!offsets || (PyArray_NDIM(offsets) == 2 && PyArray_DIM(offsets, 1) != 2) || (PyArray_NDIM(offsets) == 1 && PyArray_DIM(offsets, 0) != 0)) { @@ -1078,7 +1079,6 @@ Py_XDECREF(edgecolors); return Py::Object(); } catch (...) { - printf("Exception!\n"); Py_XDECREF(offsets); Py_XDECREF(facecolors); Py_XDECREF(edgecolors); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
Revision: 4888 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=4888&view=rev Author: mdboom Date: 2008年01月23日 06:35:21 -0800 (2008年1月23日) Log Message: ----------- Minor speed improvements in Agg backend. Modified Paths: -------------- trunk/matplotlib/src/_backend_agg.cpp trunk/matplotlib/src/agg_py_path_iterator.h Modified: trunk/matplotlib/src/_backend_agg.cpp =================================================================== --- trunk/matplotlib/src/_backend_agg.cpp 2008年01月23日 13:33:01 UTC (rev 4887) +++ trunk/matplotlib/src/_backend_agg.cpp 2008年01月23日 14:35:21 UTC (rev 4888) @@ -343,6 +343,10 @@ return false; code = path.vertex(&x0, &y0); + if (code == agg::path_cmd_stop) { + path.rewind(0); + return false; + } trans.transform(&x0, &y0); while ((code = path.vertex(&x1, &y1)) != agg::path_cmd_stop) { @@ -1602,7 +1606,6 @@ double g = Py::Float(rgb[1]); double b = Py::Float(rgb[2]); return agg::rgba(r, g, b, alpha); - } @@ -1615,8 +1618,6 @@ double p = Py::Float( points ) ; //return (int)(p*PIXELS_PER_INCH/72.0*dpi/72.0)+0.5; return (int)(p*dpi/72.0)+0.5; - - } double Modified: trunk/matplotlib/src/agg_py_path_iterator.h =================================================================== --- trunk/matplotlib/src/agg_py_path_iterator.h 2008年01月23日 13:33:01 UTC (rev 4887) +++ trunk/matplotlib/src/agg_py_path_iterator.h 2008年01月23日 14:35:21 UTC (rev 4888) @@ -118,7 +118,7 @@ SimplifyPath(VertexSource& source, bool quantize, bool simplify, double width = 0.0, double height = 0.0) : m_source(&source), m_quantize(quantize), m_simplify(simplify), - m_width(width), m_height(height), m_queue_read(0), m_queue_write(0), + m_width(width + 1.0), m_height(height + 1.0), m_queue_read(0), m_queue_write(0), m_moveto(true), m_lastx(0.0), m_lasty(0.0), m_clipped(false), m_do_clipping(width > 0.0 && height > 0.0), m_origdx(0.0), m_origdy(0.0), @@ -246,9 +246,9 @@ //could be clipped, but a more involved calculation would be needed if (m_do_clipping && ((*x < -1.0 && m_lastx < -1.0) || - (*x > m_width + 1.0 && m_lastx > m_width + 1.0) || + (*x > m_width && m_lastx > m_width) || (*y < -1.0 && m_lasty < -1.0) || - (*y > m_height + 1.0 && m_lasty > m_height + 1.0))) + (*y > m_height && m_lasty > m_height))) { m_lastx = *x; m_lasty = *y; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
Revision: 4887 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=4887&view=rev Author: jswhit Date: 2008年01月23日 05:33:01 -0800 (2008年1月23日) Log Message: ----------- remove backwards compatibility kludge for ax.get_position Modified Paths: -------------- trunk/toolkits/basemap/examples/contour_demo.py trunk/toolkits/basemap/examples/panelplot.py trunk/toolkits/basemap/examples/plotmap.py trunk/toolkits/basemap/examples/plotmap_masked.py trunk/toolkits/basemap/examples/plotmap_oo.py trunk/toolkits/basemap/examples/plotprecip.py trunk/toolkits/basemap/examples/pnganim.py trunk/toolkits/basemap/examples/simpletest_oo.py trunk/toolkits/basemap/examples/test.py Modified: trunk/toolkits/basemap/examples/contour_demo.py =================================================================== --- trunk/toolkits/basemap/examples/contour_demo.py 2008年01月23日 13:20:03 UTC (rev 4886) +++ trunk/toolkits/basemap/examples/contour_demo.py 2008年01月23日 13:33:01 UTC (rev 4887) @@ -22,11 +22,8 @@ CS = m.contour(x,y,hgt,15,linewidths=0.5,colors='k') CS = m.contourf(x,y,hgt,15,cmap=cm.jet) # setup colorbar axes instance. -# for matplotlib 0.91 and earlier, could do l,b,w,h = ax.get_position() -# for post 0.91, pos = ax.get_position(); l,b,w,h = pos.bounds -# this works for both. pos = ax.get_position() -l, b, w, h = getattr(pos, 'bounds', pos) +l, b, w, h = pos.bounds cax = axes([l+w+0.075, b, 0.05, h]) # setup colorbar axes colorbar(drawedges=True, cax=cax) # draw colorbar axes(ax) # make the original axes current again @@ -52,7 +49,7 @@ CS = m.contour(x,y,hgt,15,linewidths=0.5,colors='k') CS = m.contourf(x,y,hgt,15,cmap=cm.jet) pos = ax.get_position() -l, b, w, h = getattr(pos, 'bounds', pos) +l, b, w, h = pos.bounds cax = axes([l+w+0.075, b, 0.05, h]) # setup colorbar axes colorbar(drawedges=True, cax=cax) # draw colorbar axes(ax) # make the original axes current again @@ -78,7 +75,7 @@ CS = m.contour(x,y,hgt,15,linewidths=0.5,colors='k') CS = m.contourf(x,y,hgt,15,cmap=cm.jet) pos = ax.get_position() -l, b, w, h = getattr(pos, 'bounds', pos) +l, b, w, h = pos.bounds cax = axes([l+w+0.075, b, 0.05, h]) # setup colorbar axes colorbar(drawedges=True, cax=cax) # draw colorbar axes(ax) # make the original axes current again @@ -104,7 +101,7 @@ CS = m.contour(x,y,hgt,15,linewidths=0.5,colors='k') CS = m.contourf(x,y,hgt,15,cmap=cm.jet) pos = ax.get_position() -l, b, w, h = getattr(pos, 'bounds', pos) +l, b, w, h = pos.bounds cax = axes([l+w+0.075, b, 0.05, h]) # setup colorbar axes colorbar(drawedges=True, cax=cax) # draw colorbar axes(ax) # make the original axes current again @@ -131,7 +128,7 @@ CS = m.contour(x,y,hgt,15,linewidths=0.5,colors='k') CS = m.contourf(x,y,hgt,15,cmap=cm.jet) pos = ax.get_position() -l, b, w, h = getattr(pos, 'bounds', pos) +l, b, w, h = pos.bounds cax = axes([l+w+0.075, b, 0.05, h]) # setup colorbar axes colorbar(drawedges=True, cax=cax) # draw colorbar axes(ax) # make the original axes current again Modified: trunk/toolkits/basemap/examples/panelplot.py =================================================================== --- trunk/toolkits/basemap/examples/panelplot.py 2008年01月23日 13:20:03 UTC (rev 4886) +++ trunk/toolkits/basemap/examples/panelplot.py 2008年01月23日 13:33:01 UTC (rev 4887) @@ -28,7 +28,7 @@ CS = mnh.contourf(xnh,ynh,hgt,15,cmap=P.cm.Spectral) # colorbar on bottom. pos = ax.get_position() -l, b, w, h = getattr(pos, 'bounds', pos) +l, b, w, h = pos.bounds cax = P.axes([l, b-0.05, w, 0.025]) # setup colorbar axes P.colorbar(cax=cax, orientation='horizontal',ticks=CS.levels[0::4]) # draw colorbar P.axes(ax) # make the original axes current again @@ -51,7 +51,7 @@ CS = msh.contourf(xsh,ysh,hgt,15,cmap=P.cm.Spectral) # colorbar on bottom. pos = ax.get_position() -l, b, w, h = getattr(pos, 'bounds', pos) +l, b, w, h = pos.bounds cax = P.axes([l, b-0.05, w, 0.025]) # setup colorbar axes P.colorbar(cax=cax,orientation='horizontal',ticks=MultipleLocator(320)) # draw colorbar P.axes(ax) # make the original axes current again @@ -74,7 +74,7 @@ CS = mnh.contourf(xnh,ynh,hgt,15,cmap=P.cm.RdBu) # colorbar on right pos = ax.get_position() -l, b, w, h = getattr(pos, 'bounds', pos) +l, b, w, h = pos.bounds cax = P.axes([l+w+0.025, b, 0.025, h]) # setup colorbar axes P.colorbar(cax=cax, ticks=MultipleLocator(160), format='%4i') # draw colorbar P.axes(ax) # make the original axes current again @@ -89,7 +89,7 @@ CS = msh.contourf(xsh,ysh,hgt,15,cmap=P.cm.RdBu) # colorbar on right. pos = ax.get_position() -l, b, w, h = getattr(pos, 'bounds', pos) +l, b, w, h = pos.bounds cax = P.axes([l+w+0.025, b, 0.025, h]) # setup colorbar axes P.colorbar(cax=cax, ticks=MultipleLocator(160), format='%4i') # draw colorbar P.axes(ax) # make the original axes current again Modified: trunk/toolkits/basemap/examples/plotmap.py =================================================================== --- trunk/toolkits/basemap/examples/plotmap.py 2008年01月23日 13:20:03 UTC (rev 4886) +++ trunk/toolkits/basemap/examples/plotmap.py 2008年01月23日 13:33:01 UTC (rev 4887) @@ -32,11 +32,8 @@ # plot image over map with imshow. im = m.imshow(topodat,cm.jet) # setup colorbar axes instance. -# for matplotlib 0.91 and earlier, could do l,b,w,h = ax.get_position() -# for post 0.91, pos = ax.get_position(); l,b,w,h = pos.bounds -# this works for both. pos = ax.get_position() -l, b, w, h = getattr(pos, 'bounds', pos) +l, b, w, h = pos.bounds cax = axes([l+w+0.075, b, 0.05, h]) colorbar(cax=cax) # draw colorbar axes(ax) # make the original axes current again Modified: trunk/toolkits/basemap/examples/plotmap_masked.py =================================================================== --- trunk/toolkits/basemap/examples/plotmap_masked.py 2008年01月23日 13:20:03 UTC (rev 4886) +++ trunk/toolkits/basemap/examples/plotmap_masked.py 2008年01月23日 13:33:01 UTC (rev 4887) @@ -40,11 +40,8 @@ # plot image over map with imshow. im = m.imshow(topodatm,palette,norm=colors.normalize(vmin=0.0,vmax=3000.0,clip=False)) # setup colorbar axes instance. -# for matplotlib 0.91 and earlier, could do l,b,w,h = ax.get_position() -# for post 0.91, pos = ax.get_position(); l,b,w,h = pos.bounds -# this works for both. pos = ax.get_position() -l, b, w, h = getattr(pos, 'bounds', pos) +l, b, w, h = pos.bounds cax = axes([l+w+0.075, b, 0.05, h]) colorbar(cax=cax) # draw colorbar axes(ax) # make the original axes current again Modified: trunk/toolkits/basemap/examples/plotmap_oo.py =================================================================== --- trunk/toolkits/basemap/examples/plotmap_oo.py 2008年01月23日 13:20:03 UTC (rev 4886) +++ trunk/toolkits/basemap/examples/plotmap_oo.py 2008年01月23日 13:33:01 UTC (rev 4887) @@ -45,11 +45,8 @@ # plot image over map with imshow. im = m.imshow(topodat,cm.jet) # setup colorbar axes instance. -# for matplotlib 0.91 and earlier, could do l,b,w,h = ax.get_position() -# for post 0.91, pos = ax.get_position(); l,b,w,h = pos.bounds -# this works for both. pos = ax.get_position() -l, b, w, h = getattr(pos, 'bounds', pos) +l, b, w, h = pos.bounds cax = fig.add_axes([l+w+0.075, b, 0.05, h],frameon=False) # setup colorbar axes fig.colorbar(im, cax=cax) # draw colorbar # plot blue dot on boulder, colorado and label it as such. Modified: trunk/toolkits/basemap/examples/plotprecip.py =================================================================== --- trunk/toolkits/basemap/examples/plotprecip.py 2008年01月23日 13:20:03 UTC (rev 4886) +++ trunk/toolkits/basemap/examples/plotprecip.py 2008年01月23日 13:33:01 UTC (rev 4887) @@ -52,7 +52,7 @@ cs = m.contourf(x,y,data,clevs,cmap=cm.s3pcpn) # new axis for colorbar. pos = ax.get_position() -l, b, w, h = getattr(pos, 'bounds', pos) +l, b, w, h = pos.bounds cax = pylab.axes([l+w+0.025, b, 0.025, h]) # setup colorbar axes # draw colorbar. pylab.colorbar(cs, cax, format='%g', ticks=clevs, drawedges=False) @@ -78,7 +78,7 @@ im2.set_cmap(cm.s3pcpn_l) # new axis for colorbar. pos = ax.get_position() -l, b, w, h = getattr(pos, 'bounds', pos) +l, b, w, h = pos.bounds cax = pylab.axes([l+w+0.025, b, 0.025, h]) # setup colorbar axes # using im2, not im (hack to prevent colors from being # too compressed at the low end on the colorbar - results Modified: trunk/toolkits/basemap/examples/pnganim.py =================================================================== --- trunk/toolkits/basemap/examples/pnganim.py 2008年01月23日 13:20:03 UTC (rev 4886) +++ trunk/toolkits/basemap/examples/pnganim.py 2008年01月23日 13:33:01 UTC (rev 4887) @@ -99,7 +99,7 @@ # number of repeated frames at beginning and end is n1. nframe = 0; n1 = 10 pos = ax.get_position() -l, b, w, h = getattr(pos, 'bounds', pos) +l, b, w, h = pos.bounds # loop over times, make contour plots, draw coastlines, # parallels, meridians and title. for nt,date in enumerate(datelabels[1:]): Modified: trunk/toolkits/basemap/examples/simpletest_oo.py =================================================================== --- trunk/toolkits/basemap/examples/simpletest_oo.py 2008年01月23日 13:20:03 UTC (rev 4886) +++ trunk/toolkits/basemap/examples/simpletest_oo.py 2008年01月23日 13:33:01 UTC (rev 4887) @@ -37,11 +37,8 @@ # add a title. ax.set_title('Robinson Projection') # add a colorbar. -# for matplotlib 0.91 and earlier, could do l,b,w,h = ax.get_position() -# for post 0.91, pos = ax.get_position(); l,b,w,h = pos.bounds -# this works for both. pos = ax.get_position() -l, b, w, h = getattr(pos, 'bounds', pos) +l, b, w, h = pos.bounds cax = fig.add_axes([l, b-0.1, w, 0.03],frameon=False) # setup colorbar axes fig.colorbar(cs, cax=cax, orientation='horizontal',ticks=cs.levels[::3]) # save image (width 800 pixels with dpi=100 and fig width 8 inches). Modified: trunk/toolkits/basemap/examples/test.py =================================================================== --- trunk/toolkits/basemap/examples/test.py 2008年01月23日 13:20:03 UTC (rev 4886) +++ trunk/toolkits/basemap/examples/test.py 2008年01月23日 13:33:01 UTC (rev 4887) @@ -30,11 +30,8 @@ # plot image over map. im = m.imshow(topoin,cm.jet) # get axes position, add colorbar axes to right of this. -# for matplotlib 0.91 and earlier, could do l,b,w,h = ax.get_position() -# for post 0.91, pos = ax.get_position(); l,b,w,h = pos.bounds -# this works for both. pos = ax.get_position() -l, b, w, h = getattr(pos, 'bounds', pos) +l, b, w, h = pos.bounds cax = axes([l+w+0.05, b, 0.05, h]) # setup colorbar axes. colorbar(cax=cax) # draw colorbar axes(ax) # make the original axes current again @@ -114,7 +111,7 @@ # get current axis instance. ax = gca() pos = ax.get_position() -l, b, w, h = getattr(pos, 'bounds', pos) +l, b, w, h = pos.bounds cax = axes([l+w+0.05, b, 0.05, h]) # setup colorbar axes. colorbar(cax=cax) # draw colorbar axes(ax) # make the original axes current again @@ -146,7 +143,7 @@ # get current axis instance. ax = gca() pos = ax.get_position() -l, b, w, h = getattr(pos, 'bounds', pos) +l, b, w, h = pos.bounds cax = axes([l+w+0.05, b, 0.05, h]) # setup colorbar axes. colorbar(cax=cax) # draw colorbar axes(ax) # make the original axes current again @@ -179,7 +176,7 @@ # get current axis instance. ax = gca() pos = ax.get_position() -l, b, w, h = getattr(pos, 'bounds', pos) +l, b, w, h = pos.bounds cax = axes([l+w+0.05, b, 0.05, h]) # setup colorbar axes. colorbar(cax=cax) # draw colorbar axes(ax) # make the original axes current again @@ -211,7 +208,7 @@ # get current axis instance. ax = gca() pos = ax.get_position() -l, b, w, h = getattr(pos, 'bounds', pos) +l, b, w, h = pos.bounds cax = axes([l+w+0.05, b, 0.05, h]) # setup colorbar axes. colorbar(cax=cax) # draw colorbar axes(ax) # make the original axes current again @@ -245,7 +242,7 @@ # get current axis instance. ax = gca() pos = ax.get_position() -l, b, w, h = getattr(pos, 'bounds', pos) +l, b, w, h = pos.bounds cax = axes([l+w+0.05, b, 0.05, h]) # setup colorbar axes. colorbar(cax=cax) # draw colorbar axes(ax) # make the original axes current again @@ -276,7 +273,7 @@ # plot image over map. im = m.imshow(topodat,cm.jet) pos = ax.get_position() -l, b, w, h = getattr(pos, 'bounds', pos) +l, b, w, h = pos.bounds cax = axes([l+w+0.05, b, 0.05, h]) # setup colorbar axes. colorbar(cax=cax) # draw colorbar axes(ax) # make the original axes current again @@ -309,7 +306,7 @@ # plot image over map. im = m.imshow(topodat,cm.jet) pos = ax.get_position() -l, b, w, h = getattr(pos, 'bounds', pos) +l, b, w, h = pos.bounds cax = axes([l+w+0.075, b, 0.05, h]) # setup colorbar axes. colorbar(cax=cax) # draw colorbar axes(ax) # make the original axes current again @@ -344,7 +341,7 @@ im = m.imshow(topodat,cm.jet) im.set_clim(-4000.,3000.) # adjust range of colors. pos = ax.get_position() -l, b, w, h = getattr(pos, 'bounds', pos) +l, b, w, h = pos.bounds cax = axes([l+w+0.075, b, 0.05, h]) # setup colorbar axes. colorbar(cax=cax) # draw colorbar axes(ax) # make the original axes current again @@ -379,7 +376,7 @@ # plot image over map. im = m.imshow(topodat,cm.jet) pos = ax.get_position() -l, b, w, h = getattr(pos, 'bounds', pos) +l, b, w, h = pos.bounds cax = axes([l+w+0.075, b, 0.05, h]) # setup colorbar axes. colorbar(cax=cax) # draw colorbar axes(ax) # make the original axes current again @@ -410,7 +407,7 @@ # plot image over map. im = m.imshow(topodat,cm.jet) pos = ax.get_position() -l, b, w, h = getattr(pos, 'bounds', pos) +l, b, w, h = pos.bounds cax = axes([l+w+0.075, b, 0.05, h]) # setup colorbar axes. colorbar(cax=cax) # draw colorbar axes(ax) # make the original axes current again @@ -442,7 +439,7 @@ # plot image over map. im = m.imshow(topodat,cm.jet) pos = ax.get_position() -l, b, w, h = getattr(pos, 'bounds', pos) +l, b, w, h = pos.bounds cax = axes([l+w+0.075, b, 0.05, h]) # setup colorbar axes. colorbar(cax=cax) # draw colorbar axes(ax) # make the original axes current again @@ -483,7 +480,7 @@ # - see contour_demo.py) im = m.imshow(topo,palette,norm=colors.normalize(clip=False)) pos = ax.get_position() -l, b, w, h = getattr(pos, 'bounds', pos) +l, b, w, h = pos.bounds cax = axes([l+w+0.075, b, 0.05, h]) # setup colorbar axes. colorbar(cax=cax) # draw colorbar axes(ax) # make the original axes current again @@ -524,7 +521,7 @@ # - see contour_demo.py) im = m.imshow(topo,palette,norm=colors.normalize(clip=False)) pos = ax.get_position() -l, b, w, h = getattr(pos, 'bounds', pos) +l, b, w, h = pos.bounds cax = axes([l+w+0.075, b, 0.05, h]) # setup colorbar axes. colorbar(cax=cax) # draw colorbar axes(ax) # make the original axes current again @@ -552,7 +549,7 @@ x,y = m(*meshgrid(lonsin,latsin)) p = m.pcolormesh(x,y,topodatin,shading='flat') pos = ax.get_position() -l, b, w, h = getattr(pos, 'bounds', pos) +l, b, w, h = pos.bounds cax = axes([l+w+0.05, b, 0.05, h]) # setup colorbar axes. colorbar(cax=cax) # draw colorbar axes(ax) # make the original axes current again @@ -579,7 +576,7 @@ x,y = m(*meshgrid(lonsin,latsin)) p = m.pcolormesh(x,y,topodatin,shading='flat') pos = ax.get_position() -l, b, w, h = getattr(pos, 'bounds', pos) +l, b, w, h = pos.bounds cax = axes([l+w+0.05, b, 0.05, h]) # setup colorbar axes. colorbar(cax=cax) # draw colorbar axes(ax) # make the original axes current again @@ -606,7 +603,7 @@ x,y = m(*meshgrid(lonsin,latsin)) p = m.pcolormesh(x,y,topodatin,shading='flat') pos = ax.get_position() -l, b, w, h = getattr(pos, 'bounds', pos) +l, b, w, h = pos.bounds cax = axes([l+w+0.05, b, 0.05, h]) # setup colorbar axes. colorbar(cax=cax) # draw colorbar axes(ax) # make the original axes current again This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
Revision: 4886 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=4886&view=rev Author: jswhit Date: 2008年01月23日 05:20:03 -0800 (2008年1月23日) Log Message: ----------- make a copy of projparams dict, so original is not modified. Modified Paths: -------------- trunk/toolkits/basemap/lib/mpl_toolkits/basemap/basemap.py Modified: trunk/toolkits/basemap/lib/mpl_toolkits/basemap/basemap.py =================================================================== --- trunk/toolkits/basemap/lib/mpl_toolkits/basemap/basemap.py 2008年01月22日 19:43:18 UTC (rev 4885) +++ trunk/toolkits/basemap/lib/mpl_toolkits/basemap/basemap.py 2008年01月23日 13:20:03 UTC (rev 4886) @@ -930,7 +930,7 @@ boundaryxy = _geos.Polygon(b) # compute proj instance for full disk, if necessary. if not self._fulldisk: - projparms = self.projparams + projparms = self.projparams.copy() del projparms['x_0'] del projparms['y_0'] if self.projection == 'ortho': This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.