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
|
From: <md...@us...> - 2007-11-26 14:08:35
|
Revision: 4436 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=4436&view=rev Author: mdboom Date: 2007-11-26 06:08:30 -0800 (Mon, 26 Nov 2007) Log Message: ----------- Fix stixsans mode: Circled numerals should never be slanted. Modified Paths: -------------- trunk/matplotlib/lib/matplotlib/_mathtext_data.py Modified: trunk/matplotlib/lib/matplotlib/_mathtext_data.py =================================================================== --- trunk/matplotlib/lib/matplotlib/_mathtext_data.py 2007-11-26 14:06:57 UTC (rev 4435) +++ trunk/matplotlib/lib/matplotlib/_mathtext_data.py 2007-11-26 14:08:30 UTC (rev 4436) @@ -2298,7 +2298,7 @@ [ (0x0041, 0x0041, 'it', 0xe154), # A-B (0x0043, 0x0043, 'it', 0x2102), # C (missing in beta STIX fonts) - (0x0044, 0x0044, 'it', 0x2145), # D + (0x0044, 0x0044, 'it', 0x2145), # D (0x0045, 0x0047, 'it', 0xe156), # E-G (0x0048, 0x0048, 'it', 0x210d), # H (missing in beta STIX fonts) (0x0049, 0x004d, 'it', 0xe159), # I-M @@ -2346,8 +2346,8 @@ ], 'it': [ - (0x0030, 0x0030, 'it', 0x24ea), # 0 - (0x0031, 0x0039, 'it', 0x2460), # 1-9 + (0x0030, 0x0030, 'rm', 0x24ea), # 0 + (0x0031, 0x0039, 'rm', 0x2460), # 1-9 (0x0041, 0x005a, 'it', 0x24b6), # A-Z (0x0061, 0x007a, 'it', 0x24d0) # a-z ], @@ -2436,7 +2436,7 @@ [ # These numerals are actually upright. We don't actually # want italic numerals ever. - (0x0030, 0x0039, 'rm', 0x1d7e2), # 0-9 + (0x0030, 0x0039, 'rm', 0x1d7e2), # 0-9 (0x0041, 0x005a, 'it', 0x1d608), # A-Z (0x0061, 0x007a, 'it', 0x1d622), # a-z (0x0391, 0x03a9, 'rm', 0xe17d), # \Alpha-\Omega This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <md...@us...> - 2007-11-26 14:06:58
|
Revision: 4435 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=4435&view=rev Author: mdboom Date: 2007-11-26 06:06:57 -0800 (Mon, 26 Nov 2007) Log Message: ----------- Fix stixsans mode: Upper case Greek should be non-slanted. Modified Paths: -------------- trunk/matplotlib/lib/matplotlib/_mathtext_data.py Modified: trunk/matplotlib/lib/matplotlib/_mathtext_data.py =================================================================== --- trunk/matplotlib/lib/matplotlib/_mathtext_data.py 2007-11-26 04:06:01 UTC (rev 4434) +++ trunk/matplotlib/lib/matplotlib/_mathtext_data.py 2007-11-26 14:06:57 UTC (rev 4435) @@ -2439,7 +2439,7 @@ (0x0030, 0x0039, 'rm', 0x1d7e2), # 0-9 (0x0041, 0x005a, 'it', 0x1d608), # A-Z (0x0061, 0x007a, 'it', 0x1d622), # a-z - (0x0391, 0x03a9, 'it', 0xe1bf), # \Alpha-\Omega + (0x0391, 0x03a9, 'rm', 0xe17d), # \Alpha-\Omega (0x03b1, 0x03c9, 'it', 0xe1d8), # \alpha-\omega (0x03d1, 0x03d1, 'it', 0xe1f2), # theta variant (0x03d5, 0x03d5, 'it', 0xe1f3), # phi variant This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <jd...@us...> - 2007-11-26 04:06:03
|
Revision: 4434 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=4434&view=rev Author: jdh2358 Date: 2007-11-25 20:06:01 -0800 (Sun, 25 Nov 2007) Log Message: ----------- added x11 to default darwin list Modified Paths: -------------- trunk/matplotlib/setupext.py Modified: trunk/matplotlib/setupext.py =================================================================== --- trunk/matplotlib/setupext.py 2007-11-25 03:52:28 UTC (rev 4433) +++ trunk/matplotlib/setupext.py 2007-11-26 04:06:01 UTC (rev 4434) @@ -51,7 +51,7 @@ 'linux' : ['/usr/local', '/usr',], 'cygwin' : ['/usr/local', '/usr',], 'darwin' : ['/sw/lib/freetype2', '/sw/lib/freetype219', '/usr/local', - '/usr', '/sw'], + '/usr', '/sw', '/usr/X11R6'], 'freebsd4' : ['/usr/local', '/usr'], 'freebsd5' : ['/usr/local', '/usr'], 'freebsd6' : ['/usr/local', '/usr'], This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <js...@us...> - 2007-11-25 03:52:29
|
Revision: 4433 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=4433&view=rev Author: jswhit Date: 2007-11-24 19:52:28 -0800 (Sat, 24 Nov 2007) Log Message: ----------- modify NetCDFFile Modified Paths: -------------- trunk/toolkits/basemap/Changelog Modified: trunk/toolkits/basemap/Changelog =================================================================== --- trunk/toolkits/basemap/Changelog 2007-11-24 19:57:45 UTC (rev 4432) +++ trunk/toolkits/basemap/Changelog 2007-11-25 03:52:28 UTC (rev 4433) @@ -1,3 +1,6 @@ + * modify NetCDFFile to automatically apply scale_factor + and add_offset, and return masked arrays masked where + data == missing_value or _FillValue. * add 'fill_color' option to drawmapboundary, to optionally fill the map projection background a certain color. * added 'sstanom' colormap from This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <js...@us...> - 2007-11-24 19:57:48
|
Revision: 4432 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=4432&view=rev Author: jswhit Date: 2007-11-24 11:57:45 -0800 (Sat, 24 Nov 2007) Log Message: ----------- no longer need to manually create masked array Modified Paths: -------------- trunk/toolkits/basemap/examples/ccsm_popgrid.py Modified: trunk/toolkits/basemap/examples/ccsm_popgrid.py =================================================================== --- trunk/toolkits/basemap/examples/ccsm_popgrid.py 2007-11-24 19:43:37 UTC (rev 4431) +++ trunk/toolkits/basemap/examples/ccsm_popgrid.py 2007-11-24 19:57:45 UTC (rev 4432) @@ -36,16 +36,13 @@ fpin = NetCDFFile(infile) tlat = fpin.variables['TLAT'][:] tlon = fpin.variables['TLONG'][:] +# masked array returned, masked where data == _FillValue temp = fpin.variables['TEMP'][:] -fillvalue = fpin.variables['TEMP'].attributes['_FillValue'] fpin.close() # make longitudes monotonically increasing. tlon = N.where(N.greater_equal(tlon,min(tlon[:,0])),tlon-360,tlon) -# create a masked array with temperature data (continents masked). -temp = MA.masked_values(temp,fillvalue) - # stack grids side-by-side (in longitiudinal direction), so # any range of longitudes may be plotted on a world map. tlon = N.concatenate((tlon,tlon+360),1) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <js...@us...> - 2007-11-24 19:43:39
|
Revision: 4431 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=4431&view=rev Author: jswhit Date: 2007-11-24 11:43:37 -0800 (Sat, 24 Nov 2007) Log Message: ----------- modify pupynere to create masked array when missing_value and/or _FillValue attribute is defined, and apply scale_factor and add_offset. Modified Paths: -------------- trunk/toolkits/basemap/lib/matplotlib/toolkits/basemap/pupynere.py Modified: trunk/toolkits/basemap/lib/matplotlib/toolkits/basemap/pupynere.py =================================================================== --- trunk/toolkits/basemap/lib/matplotlib/toolkits/basemap/pupynere.py 2007-11-24 13:25:06 UTC (rev 4430) +++ trunk/toolkits/basemap/lib/matplotlib/toolkits/basemap/pupynere.py 2007-11-24 19:43:37 UTC (rev 4431) @@ -31,7 +31,7 @@ import itertools import mmap -from numpy import ndarray, zeros, array +from numpy import ndarray, zeros, array, ma, squeeze ABSENT = '\x00' * 8 @@ -257,7 +257,23 @@ } def __getitem__(self, index): - return self.__array_data__.__getitem__(index) + # modified by jsw to automatically + # - remove singleton dimensions + # - create a masked array using missing_value or _FillValue attribute + # - apply scale_factor and add_offset to packed integer data + datout = squeeze(self.__array_data__.__getitem__(index)) + try: + datout = ma.masked_values(datout, self.missing_value) + except: + try: + datout = ma.masked_values(datout, self._FillValue) + except: + pass + try: + datout = self.scale_factor*datout + self.add_offset + except: + pass + return datout def getValue(self): """For scalars.""" This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <js...@us...> - 2007-11-24 13:25:09
|
Revision: 4430 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=4430&view=rev Author: jswhit Date: 2007-11-24 05:25:06 -0800 (Sat, 24 Nov 2007) Log Message: ----------- use drawmapboundary to fill map projection region a specified color. Useful for painting ocean areas (instead of setting axis background color, which only works for rectangular projections). Modified Paths: -------------- trunk/toolkits/basemap/Changelog trunk/toolkits/basemap/examples/customticks.py trunk/toolkits/basemap/examples/hires.py trunk/toolkits/basemap/examples/ortho_demo.py trunk/toolkits/basemap/examples/randompoints.py trunk/toolkits/basemap/lib/matplotlib/toolkits/basemap/basemap.py Modified: trunk/toolkits/basemap/Changelog =================================================================== --- trunk/toolkits/basemap/Changelog 2007-11-23 18:07:27 UTC (rev 4429) +++ trunk/toolkits/basemap/Changelog 2007-11-24 13:25:06 UTC (rev 4430) @@ -1,3 +1,5 @@ + * add 'fill_color' option to drawmapboundary, to optionally + fill the map projection background a certain color. * added 'sstanom' colormap from http://www.ghrsst-pp.org/GHRSST-PP-Data-Tools.html version 0.9.7 (svn revision 4422) Modified: trunk/toolkits/basemap/examples/customticks.py =================================================================== --- trunk/toolkits/basemap/examples/customticks.py 2007-11-23 18:07:27 UTC (rev 4429) +++ trunk/toolkits/basemap/examples/customticks.py 2007-11-24 13:25:06 UTC (rev 4430) @@ -20,17 +20,17 @@ # create figure. fig=pylab.figure() -# background color will be used for 'wet' areas. -fig.add_axes([0.1,0.1,0.8,0.8],axisbg='aqua') # create Basemap instance (regular lat/lon projection). # suppress_ticks=False allows custom axes ticks to be used # Ticks are suppressed by default, so Basemap methods # drawparallels and drawmeridians used to draw labelled lat/lon grid. m = Basemap(llcrnrlon=-156.5,llcrnrlat=18.75,urcrnrlon=-154.5,urcrnrlat=20.5, resolution='h',projection='cyl',suppress_ticks=False) -# draw coastlines, fill land areas. +# draw coastlines, fill land and lake areas. m.drawcoastlines() -m.fillcontinents(color="coral") +m.fillcontinents(color='coral',lake_color='aqua') +# background color will be used for oceans. +m.drawmapboundary(fill_color='aqua') # get axes instance. ax = pylab.gca() # add custom ticks. Modified: trunk/toolkits/basemap/examples/hires.py =================================================================== --- trunk/toolkits/basemap/examples/hires.py 2007-11-23 18:07:27 UTC (rev 4429) +++ trunk/toolkits/basemap/examples/hires.py 2007-11-24 13:25:06 UTC (rev 4430) @@ -21,15 +21,18 @@ # clear the figure clf() -ax = fig.add_axes([0.1,0.1,0.8,0.8],axisbg='aqua') # read cPickle back in and plot it again (should be much faster). t1 = time.clock() m2 = cPickle.load(open('map.pickle','rb')) # draw coastlines and fill continents. m.drawcoastlines() -m.fillcontinents(color='coral') +# fill continents and lakes +m.fillcontinents(color='coral',lake_color='aqua') # draw political boundaries. m.drawcountries(linewidth=1) +# fill map projection region light blue (this will +# paint ocean areas same color as lakes). +m.drawmapboundary(fill_color='aqua') # draw major rivers. m.drawrivers(color='b') print time.clock()-t1,' secs to plot using using a pickled Basemap instance' Modified: trunk/toolkits/basemap/examples/ortho_demo.py =================================================================== --- trunk/toolkits/basemap/examples/ortho_demo.py 2007-11-23 18:07:27 UTC (rev 4429) +++ trunk/toolkits/basemap/examples/ortho_demo.py 2007-11-24 13:25:06 UTC (rev 4430) @@ -23,11 +23,11 @@ fig = figure() m = Basemap(projection='ortho',lon_0=lon_0,lat_0=lat_0,resolution='l') m.drawcoastlines() -m.fillcontinents(color='coral') +m.fillcontinents(color='coral',lake_color='aqua') m.drawcountries() # draw parallels and meridians. m.drawparallels(arange(-90.,120.,30.)) m.drawmeridians(arange(0.,420.,60.)) -m.drawmapboundary() +m.drawmapboundary(fill_color='aqua') title('Orthographic Map Centered on Lon=%s, Lat=%s' % (lon_0,lat_0)) show() Modified: trunk/toolkits/basemap/examples/randompoints.py =================================================================== --- trunk/toolkits/basemap/examples/randompoints.py 2007-11-23 18:07:27 UTC (rev 4429) +++ trunk/toolkits/basemap/examples/randompoints.py 2007-11-24 13:25:06 UTC (rev 4430) @@ -24,8 +24,6 @@ # plot them as filled circles on the map. # first, create a figure. fig=figure() -# background color will be used for 'wet' areas. -fig.add_axes([0.1,0.1,0.8,0.8],axisbg='aqua') # draw colored markers. # use zorder=10 to make sure markers are drawn last. # (otherwise they are covered up when continents are filled) @@ -39,9 +37,11 @@ if xpt > m.xmin and xpt < m.xmax and ypt > m.ymin and ypt < m.ymax: hexcolor = rgb2hex(cm.jet(zval/100.)[:3]) text(xpt,ypt,numstr,fontsize=9,weight='bold',color=hexcolor) -# draw coasts and fill continents. +# draw coasts and fill continents/lakes. m.drawcoastlines(linewidth=0.5) -m.fillcontinents(color='coral') +m.fillcontinents(color='coral',lake_color='aqua') +# color ocean areas +m.drawmapboundary(fill_color='aqua') # draw parallels and meridians. delat = 20. circles = arange(0.,90.,delat).tolist()+\ Modified: trunk/toolkits/basemap/lib/matplotlib/toolkits/basemap/basemap.py =================================================================== --- trunk/toolkits/basemap/lib/matplotlib/toolkits/basemap/basemap.py 2007-11-23 18:07:27 UTC (rev 4429) +++ trunk/toolkits/basemap/lib/matplotlib/toolkits/basemap/basemap.py 2007-11-24 13:25:06 UTC (rev 4430) @@ -962,11 +962,20 @@ return boundaryll, boundaryxy - def drawmapboundary(self,color='k',linewidth=1.0,ax=None): + def drawmapboundary(self,color='k',linewidth=1.0,fill_color=None,\ + zorder=None,ax=None): """ - draw boundary around map projection region. If ax=None (default), - default axis instance is used, otherwise specified axis - instance is used. + draw boundary around map projection region, optionally + filling interior of region. + + linewidth - line width for boundary (default 1.) + color - color of boundary line (default black) + fill_color - fill the map region background with this + color (default is no fill or fill with axis background color). + zorder - sets the zorder for filling map background + (default 0). + ax - axes instance to use (default None, use default axes + instance). """ # get current axes instance (if none specified). if ax is None and self.ax is None: @@ -981,18 +990,30 @@ # define a circle patch, add it to axes instance. circle = Circle((self.rmajor,self.rmajor),self.rmajor) ax.add_patch(circle) - circle.set_fill(False) + if fill_color is None: + circle.set_fill(False) + else: + circle.set_facecolor(fill_color) + circle.set_zorder(0) circle.set_edgecolor(color) circle.set_linewidth(linewidth) circle.set_clip_on(False) + if zorder is not None: + circle.set_zorder(zorder) elif self.projection == 'geos' and self._fulldisk: # elliptical region # define an Ellipse patch, add it to axes instance. ellps = Ellipse((self._width,self._height),2.*self._width,2.*self._height) ax.add_patch(ellps) - ellps.set_fill(False) + if fill_color is None: + ellps.set_fill(False) + else: + ellps.set_facecolor(fill_color) + ellps.set_zorder(0) ellps.set_edgecolor(color) ellps.set_linewidth(linewidth) ellps.set_clip_on(False) + if zorder is not None: + ellps.set_zorder(0) elif self.projection in ['moll','robin','sinu']: # elliptical region. nx = 100; ny = 100 # quasi-elliptical region. @@ -1015,13 +1036,25 @@ xy = zip(x,y) poly = Polygon(xy,edgecolor=color,linewidth=linewidth) ax.add_patch(poly) - poly.set_fill(False) + if fill_color is None: + poly.set_fill(False) + else: + poly.set_facecolor(fill_color) + poly.set_zorder(0) poly.set_clip_on(False) + if zorder is not None: + poly.set_zorder(zorder) else: # all other projections are rectangular. ax.axesPatch.set_linewidth(linewidth) - ax.axesPatch.set_facecolor(ax.get_axis_bgcolor()) + if fill_color is None: + ax.axesPatch.set_facecolor(ax.get_axis_bgcolor()) + else: + ax.axesPatch.set_facecolor(fill_color) + ax.axesPatch.set_zorder(0) ax.axesPatch.set_edgecolor(color) ax.set_frame_on(True) + if zorder is not None: + ax.axesPatch.set_zorder(zorder) # set axes limits to fit map region. self.set_axes_limits(ax=ax) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <js...@us...> - 2007-11-23 18:07:44
|
Revision: 4429 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=4429&view=rev Author: jswhit Date: 2007-11-23 10:07:27 -0800 (Fri, 23 Nov 2007) Log Message: ----------- added 'sstanom' colormap. Modified Paths: -------------- trunk/toolkits/basemap/Changelog trunk/toolkits/basemap/lib/matplotlib/toolkits/basemap/cm.py Modified: trunk/toolkits/basemap/Changelog =================================================================== --- trunk/toolkits/basemap/Changelog 2007-11-23 17:54:40 UTC (rev 4428) +++ trunk/toolkits/basemap/Changelog 2007-11-23 18:07:27 UTC (rev 4429) @@ -1,3 +1,5 @@ + * added 'sstanom' colormap from + http://www.ghrsst-pp.org/GHRSST-PP-Data-Tools.html version 0.9.7 (svn revision 4422) * fixed bug in drawlsmask for 'moll','robin' and 'sinu' projections. Modified: trunk/toolkits/basemap/lib/matplotlib/toolkits/basemap/cm.py =================================================================== --- trunk/toolkits/basemap/lib/matplotlib/toolkits/basemap/cm.py 2007-11-23 17:54:40 UTC (rev 4428) +++ trunk/toolkits/basemap/lib/matplotlib/toolkits/basemap/cm.py 2007-11-23 18:07:27 UTC (rev 4429) @@ -45,6 +45,8 @@ s3pcpn = colors.LinearSegmentedColormap('s3pcpn', _s3pcpn_data, _LUTSIZE) s3pcpn_l = colors.LinearSegmentedColormap('s3pcpn_l', _s3pcpn_l_data, _LUTSIZE) StepSeq = colors.LinearSegmentedColormap('StepSeq', _StepSeq_data, _LUTSIZE) +_sstanom_data = {'blue': [(0.0, 0.858823537827, 0.858823537827), (0.0243902429938, 0.835294127464, 0.835294127464), (0.0487804859877, 0.815686285496, 0.815686285496), (0.0731707289815, 0.78823530674, 0.78823530674), (0.0975609719753, 0.819607853889, 0.819607853889), (0.12195122242, 0.882352948189, 0.882352948189), (0.146341457963, 0.945098042488, 0.945098042488), (0.170731708407, 1.0, 1.0), (0.195121943951, 1.0, 1.0), (0.219512194395, 1.0, 1.0), (0.243902444839, 1.0, 1.0), (0.268292695284, 0.886274516582, 0.886274516582), (0.292682915926, 0.745098054409, 0.745098054409), (0.31707316637, 0.603921592236, 0.603921592236), (0.341463416815, 0.51372551918, 0.51372551918), (0.365853667259, 0.552941203117, 0.552941203117), (0.390243887901, 0.588235318661, 0.588235318661), (0.414634138346, 0.623529434204, 0.623529434204), (0.43902438879, 0.658823549747, 0.658823549747), (0.463414639235, 0.694117665291, 0.694117665291), (0.487804889679, 0.729411780834, 0.729411780834), (0.512195110321, 0.717647075653, 0.717647075653), (0.536585390568, 0.658823549747, 0.658823549747), (0.56097561121, 0.603921592236, 0.603921592236), (0.585365831852, 0.537254929543, 0.537254929543), (0.609756112099, 0.380392163992, 0.380392163992), (0.634146332741, 0.227450981736, 0.227450981736), (0.658536612988, 0.0431372560561, 0.0431372560561), (0.68292683363, 0.0, 0.0), (0.707317054272, 0.0, 0.0), (0.731707334518, 0.0, 0.0), (0.756097555161, 0.0, 0.0), (0.780487775803, 0.0, 0.0), (0.804878056049, 0.0, 0.0), (0.829268276691, 0.0, 0.0), (0.853658556938, 0.145098045468, 0.145098045468), (0.87804877758, 0.309803932905, 0.309803932905), (0.902438998222, 0.478431373835, 0.478431373835), (0.926829278469, 0.529411792755, 0.529411792755), (0.951219499111, 0.333333343267, 0.333333343267), (0.975609779358, 0.168627455831, 0.168627455831), (1.0, 0.0, 0.0)], 'green': [(0.0, 0.0, 0.0), (0.0243902429938, 0.0, 0.0), (0.0487804859877, 0.0, 0.0), (0.0731707289815, 0.0, 0.0), (0.0975609719753, 0.0941176488996, 0.0941176488996), (0.12195122242, 0.235294118524, 0.235294118524), (0.146341457963, 0.380392163992, 0.380392163992), (0.170731708407, 0.521568655968, 0.521568655968), (0.195121943951, 0.662745118141, 0.662745118141), (0.219512194395, 0.827450990677, 0.827450990677), (0.243902444839, 0.96862745285, 0.96862745285), (0.268292695284, 1.0, 1.0), (0.292682915926, 1.0, 1.0), (0.31707316637, 1.0, 1.0), (0.341463416815, 1.0, 1.0), (0.365853667259, 1.0, 1.0), (0.390243887901, 1.0, 1.0), (0.414634138346, 1.0, 1.0), (0.43902438879, 0.933333337307, 0.933333337307), (0.463414639235, 0.86274510622, 0.86274510622), (0.487804889679, 0.792156875134, 0.792156875134), (0.512195110321, 0.792156875134, 0.792156875134), (0.536585390568, 0.86274510622, 0.86274510622), (0.56097561121, 0.933333337307, 0.933333337307), (0.585365831852, 0.996078431606, 0.996078431606), (0.609756112099, 0.92549020052, 0.92549020052), (0.634146332741, 0.854901969433, 0.854901969433), (0.658536612988, 0.772549033165, 0.772549033165), (0.68292683363, 0.701960802078, 0.701960802078), (0.707317054272, 0.631372570992, 0.631372570992), (0.731707334518, 0.556862771511, 0.556862771511), (0.756097555161, 0.470588237047, 0.470588237047), (0.780487775803, 0.329411774874, 0.329411774874), (0.804878056049, 0.160784319043, 0.160784319043), (0.829268276691, 0.0196078438312, 0.0196078438312), (0.853658556938, 0.0, 0.0), (0.87804877758, 0.0, 0.0), (0.902438998222, 0.0, 0.0), (0.926829278469, 0.0, 0.0), (0.951219499111, 0.0, 0.0), (0.975609779358, 0.0, 0.0), (1.0, 0.0, 0.0)], 'red': [(0.0, 0.419607847929, 0.419607847929), (0.0243902429938, 0.478431373835, 0.478431373835), (0.0487804859877, 0.541176497936, 0.541176497936), (0.0731707289815, 0.611764729023, 0.611764729023), (0.0975609719753, 0.51372551918, 0.51372551918), (0.12195122242, 0.333333343267, 0.333333343267), (0.146341457963, 0.152941182256, 0.152941182256), (0.170731708407, 0.0, 0.0), (0.195121943951, 0.0, 0.0), (0.219512194395, 0.0, 0.0), (0.243902444839, 0.0, 0.0), (0.268292695284, 0.113725490868, 0.113725490868), (0.292682915926, 0.254901975393, 0.254901975393), (0.31707316637, 0.40000000596, 0.40000000596), (0.341463416815, 0.521568655968, 0.521568655968), (0.365853667259, 0.603921592236, 0.603921592236), (0.390243887901, 0.678431391716, 0.678431391716), (0.414634138346, 0.749019622803, 0.749019622803), (0.43902438879, 0.752941191196, 0.752941191196), (0.463414639235, 0.749019622803, 0.749019622803), (0.487804889679, 0.749019622803, 0.749019622803), (0.512195110321, 0.792156875134, 0.792156875134), (0.536585390568, 0.86274510622, 0.86274510622), (0.56097561121, 0.933333337307, 0.933333337307), (0.585365831852, 1.0, 1.0), (0.609756112099, 1.0, 1.0), (0.634146332741, 1.0, 1.0), (0.658536612988, 1.0, 1.0), (0.68292683363, 1.0, 1.0), (0.707317054272, 1.0, 1.0), (0.731707334518, 1.0, 1.0), (0.756097555161, 1.0, 1.0), (0.780487775803, 1.0, 1.0), (0.804878056049, 1.0, 1.0), (0.829268276691, 1.0, 1.0), (0.853658556938, 0.964705884457, 0.964705884457), (0.87804877758, 0.92549020052, 0.92549020052), (0.902438998222, 0.890196084976, 0.890196084976), (0.926829278469, 0.827450990677, 0.827450990677), (0.951219499111, 0.705882370472, 0.705882370472), (0.975609779358, 0.603921592236, 0.603921592236), (1.0, 0.501960813999, 0.501960813999)]} +sstanom = colors.LinearSegmentedColormap('sstanom', _sstanom_data, _LUTSIZE) datad={} datad['GMT_drywet']=_GMT_drywet_data datad['GMT_gebco']=_GMT_gebco_data @@ -61,6 +63,7 @@ datad['s3pcpn']=_s3pcpn_data datad['s3pcpn_l']=_s3pcpn_l_data datad['StepSeq']=_StepSeq_data +datad['sstanom']=_sstanom_data # reverse all the colormaps. # reversed colormaps have '_r' appended to the name. This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <js...@us...> - 2007-11-23 17:54:49
|
Revision: 4428 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=4428&view=rev Author: jswhit Date: 2007-11-23 09:54:40 -0800 (Fri, 23 Nov 2007) Log Message: ----------- update basemap example Modified Paths: -------------- trunk/py4science/examples/basemap5.py trunk/py4science/examples/skel/basemap5_skel.py Modified: trunk/py4science/examples/basemap5.py =================================================================== --- trunk/py4science/examples/basemap5.py 2007-11-23 13:47:36 UTC (rev 4427) +++ trunk/py4science/examples/basemap5.py 2007-11-23 17:54:40 UTC (rev 4428) @@ -22,12 +22,9 @@ # create Basemap instance for mollweide projection. # coastlines not used, so resolution set to None to skip # continent processing (this speeds things up a bit) -m = Basemap(projection='moll',lon_0=lon_0,lat_0=lat_0,resolution='l') +m = Basemap(projection='moll',lon_0=lon_0,lat_0=lat_0,resolution=None) # compute map projection coordinates of grid. x, y = m(*numpy.meshgrid(lons, lats)) -# plot with contour -#CS = m.contour(x,y,sst,20,linewidths=0.5,colors='k') -#CS = m.contourf(x,y,sst,20,cmap=cmap) # plot with pcolor im = m.pcolormesh(x,y,sst,shading='flat',cmap=cmap) # draw parallels and meridians, but don't bother labelling them. Modified: trunk/py4science/examples/skel/basemap5_skel.py =================================================================== --- trunk/py4science/examples/skel/basemap5_skel.py 2007-11-23 13:47:36 UTC (rev 4427) +++ trunk/py4science/examples/skel/basemap5_skel.py 2007-11-23 17:54:40 UTC (rev 4428) @@ -30,9 +30,6 @@ m = Basemap(projection=projection,lon_0=lon_0,lat_0=lat_0,resolution=None) # compute map projection coordinates of grid. x, y = m(*numpy.meshgrid(lons, lats)) -# plot with contour -#CS = m.contour(x,y,sst,20,linewidths=0.5,colors='k') -#CS = m.contourf(x,y,sst,20,cmap=cmap) # plot with pcolor im = m.pcolormesh(x,y,sst,shading='flat',cmap=cmap) # draw parallels and meridians, but don't bother labelling them. This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <js...@us...> - 2007-11-23 13:47:39
|
Revision: 4427 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=4427&view=rev Author: jswhit Date: 2007-11-23 05:47:36 -0800 (Fri, 23 Nov 2007) Log Message: ----------- update basemap example Modified Paths: -------------- trunk/py4science/workbook/fig/basemap5.pdf trunk/py4science/workbook/fig/basemap5.png Modified: trunk/py4science/workbook/fig/basemap5.pdf =================================================================== (Binary files differ) Modified: trunk/py4science/workbook/fig/basemap5.png =================================================================== (Binary files differ) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <js...@us...> - 2007-11-23 13:45:57
|
Revision: 4426 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=4426&view=rev Author: jswhit Date: 2007-11-23 05:45:55 -0800 (Fri, 23 Nov 2007) Log Message: ----------- remove spurious pagebreak Modified Paths: -------------- trunk/py4science/workbook/basemap.tex Modified: trunk/py4science/workbook/basemap.tex =================================================================== --- trunk/py4science/workbook/basemap.tex 2007-11-23 13:38:46 UTC (rev 4425) +++ trunk/py4science/workbook/basemap.tex 2007-11-23 13:45:55 UTC (rev 4426) @@ -107,8 +107,6 @@ The resulting plot should look like Figure 4. -\pagebreak - \begin{figure}[h] \includegraphics[scale=0.75]{fig/basemap5} This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <js...@us...> - 2007-11-23 13:38:48
|
Revision: 4425 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=4425&view=rev Author: jswhit Date: 2007-11-23 05:38:46 -0800 (Fri, 23 Nov 2007) Log Message: ----------- update example Modified Paths: -------------- trunk/py4science/examples/basemap5.py Modified: trunk/py4science/examples/basemap5.py =================================================================== --- trunk/py4science/examples/basemap5.py 2007-11-23 13:38:18 UTC (rev 4424) +++ trunk/py4science/examples/basemap5.py 2007-11-23 13:38:46 UTC (rev 4425) @@ -16,7 +16,12 @@ lat_0 = lats.mean() # set colormap cmap = pylab.cm.gist_ncar +# set so masked values in an image will be black +# (i.e. continents will be painted this color) +cmap.set_bad('k') # create Basemap instance for mollweide projection. +# coastlines not used, so resolution set to None to skip +# continent processing (this speeds things up a bit) m = Basemap(projection='moll',lon_0=lon_0,lat_0=lat_0,resolution='l') # compute map projection coordinates of grid. x, y = m(*numpy.meshgrid(lons, lats)) @@ -25,9 +30,7 @@ #CS = m.contourf(x,y,sst,20,cmap=cmap) # plot with pcolor im = m.pcolormesh(x,y,sst,shading='flat',cmap=cmap) -# fill the continents (data is not defined there). -m.fillcontinents(color='k',lake_color='k') -# draw parallels and meridians. +# draw parallels and meridians, but don't bother labelling them. m.drawparallels(numpy.arange(-90.,120.,30.)) m.drawmeridians(numpy.arange(0.,420.,60.)) # draw line around map projection limb. This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <js...@us...> - 2007-11-23 13:38:20
|
Revision: 4424 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=4424&view=rev Author: jswhit Date: 2007-11-23 05:38:18 -0800 (Fri, 23 Nov 2007) Log Message: ----------- add basemap skeletons Modified Paths: -------------- trunk/py4science/examples/skel/basemap2_skel.py Added Paths: ----------- trunk/py4science/examples/skel/basemap3_skel.py trunk/py4science/examples/skel/basemap4_skel.py trunk/py4science/examples/skel/basemap5_skel.py Modified: trunk/py4science/examples/skel/basemap2_skel.py =================================================================== --- trunk/py4science/examples/skel/basemap2_skel.py 2007-11-22 19:37:56 UTC (rev 4423) +++ trunk/py4science/examples/skel/basemap2_skel.py 2007-11-23 13:38:18 UTC (rev 4424) @@ -1,15 +1,16 @@ import pylab, numpy -from matplotlib.toolkits.basemap import Basemap +from matplotlib.toolkits.basemap import Basemap, supported_projections # create figure. # background color will be used for 'wet' areas. fig = pylab.figure() fig.add_axes([0.1,0.1,0.8,0.8],axisbg='aqua') # create map by specifying width and height in km. -projection = 'lcc' # map projection +projection = XX # map projection ('lcc','stere','laea','aea' etc) + # 'print supported_projections' gives a list resolution = XX # resolution of boundaries ('c','l','i',or 'h') -lon_0=XX # longitude of origin of map projection domain (degrees). -lat_0=XX # standard parallel/latitude of origin of map projection domain. +lon_0= XX # longitude of origin of map projection domain (degrees). +lat_0= XX # standard parallel/latitude of origin of map projection domain. width = XX # width of map projecton domain in km. height = XX # height of map projection domain in km. m = Basemap(lon_0=lon_0,lat_0=lat_0,\ Added: trunk/py4science/examples/skel/basemap3_skel.py =================================================================== --- trunk/py4science/examples/skel/basemap3_skel.py (rev 0) +++ trunk/py4science/examples/skel/basemap3_skel.py 2007-11-23 13:38:18 UTC (rev 4424) @@ -0,0 +1,46 @@ +import pylab, numpy +from matplotlib.toolkits.basemap import Basemap + +# create figure. +# background color will be used for 'wet' areas. +fig = pylab.figure() +fig.add_axes([0.1,0.1,0.8,0.8],axisbg='aqua') +# create map by specifying width and height in km. +resolution = 'l' +lon_0 = -50 +lat_0 = 60 +projection = 'lcc' +width = 12000000 +height = 0.75*width +m = Basemap(lon_0=lon_0,lat_0=lat_0,\ + width=width,height=height,\ + resolution=resolution,projection=projection) +# lat/lon and name of location 1. +lat1 = XX +lon1 = XX +name1 = XX +# ditto for location 2. +lat2 = XX +lon2 = XX +name2 = XX +# convert these points to map projection coordinates +# (using __call__ method of Basemap instance) +x1, y1 = m(lon1, lat1) +x2, y2 = m(lon2, lat2) +# plot black dots at the two points. +# make sure dots are drawn on top of other plot elements (zorder=10) +m.scatter([x1,x2],[y1,y2],25,color='k',marker='o',zorder=10) +# connect the dots along a great circle. +m.drawgreatcircle(lon1,lat1,lon2,lat2,linewidth=2,color='k') +# put the names of the cities to the left of each dot, offset +# by a little. Use a bold font. +pylab.text(x1-100000,y1+100000,name1,fontsize=12,\ + color='k',horizontalalignment='right',fontweight='bold') +pylab.text(x2-100000,y2+100000,name2,fontsize=12,\ + color='k',horizontalalignment='right',fontweight='bold') +m.drawcoastlines(linewidth=0.5) +m.fillcontinents(color='coral') +m.drawcountries() +m.drawstates() +pylab.title(name1+' to '+name2+' Great Circle') +pylab.show() Added: trunk/py4science/examples/skel/basemap4_skel.py =================================================================== --- trunk/py4science/examples/skel/basemap4_skel.py (rev 0) +++ trunk/py4science/examples/skel/basemap4_skel.py 2007-11-23 13:38:18 UTC (rev 4424) @@ -0,0 +1,35 @@ +import pylab, numpy +from matplotlib.toolkits.basemap import Basemap +# create figure. +# background color will be used for 'wet' areas. +fig = pylab.figure() +fig.add_axes([0.1,0.1,0.8,0.8],axisbg='aqua') +# create map by specifying width and height in km. +resolution = 'l' +lon_0 = -50 +lat_0 = 60 +projection = 'lcc' +width = 12000000 +height = 0.75*width +m = Basemap(lon_0=lon_0,lat_0=lat_0,\ + width=width,height=height,\ + resolution=resolution,projection=projection) +m.drawcoastlines(linewidth=0.5) +m.fillcontinents(color='coral') +m.drawcountries() +m.drawstates() +# draw and label parallels. +# labels is list of 4 values (default [0,0,0,0]) that control whether +# parallels are labelled where they intersect the left, right, top or +# bottom of the plot. For example labels=[1,0,0,1] will cause parallels +# to be labelled where they intersect the left and bottom of the plot, +# but not the right and top. +labels = XX +parallels = XX # a sequence of latitudes values +m.drawparallels(parallels,labels=labels) +# draw and label meridians. +labels = XX +meridians = XX # a sequence of longitude values +m.drawmeridians(meridians,labels=labels) +pylab.title('labelled meridians and parallels',y=1.075) +pylab.show() Added: trunk/py4science/examples/skel/basemap5_skel.py =================================================================== --- trunk/py4science/examples/skel/basemap5_skel.py (rev 0) +++ trunk/py4science/examples/skel/basemap5_skel.py 2007-11-23 13:38:18 UTC (rev 4424) @@ -0,0 +1,45 @@ +from matplotlib.toolkits.basemap import Basemap, NetCDFFile, cm +import pylab, numpy +from numpy import ma + +# read in netCDF sea-surface temperature data +ncfile = NetCDFFile('data/sst.nc') +sstv = ncfile.variables['analysed_sst'] +sst = ma.masked_values(numpy.squeeze(sstv[:]), sstv._FillValue) +sst = sstv.scale_factor*sst + sstv.add_offset +lats = ncfile.variables['lat'][:] +lons = ncfile.variables['lon'][:] +print sst.shape, sst.min(), sst.max() + +# make sure middle of map region is middle of data grid. +lon_0 = lons.mean() +lat_0 = lats.mean() +# set colormap +#cmap = pylab.cm.gist_ncar +# Basemap comes with extra colormaps from Generic Mapping Tools +# (imported as cm, pylab colormaps in pylab.cm) +cmap = XX +# set so masked values in an image will be painted specified color +# (i.e. continents will be painted this color) +color = XX +cmap.set_bad(color) +# create Basemap instance for mollweide projection. +projection = XX # try moll, robin, sinu or ortho. +# coastlines not used, so resolution set to None to skip +# continent processing (this speeds things up a bit) +m = Basemap(projection=projection,lon_0=lon_0,lat_0=lat_0,resolution=None) +# compute map projection coordinates of grid. +x, y = m(*numpy.meshgrid(lons, lats)) +# plot with contour +#CS = m.contour(x,y,sst,20,linewidths=0.5,colors='k') +#CS = m.contourf(x,y,sst,20,cmap=cmap) +# plot with pcolor +im = m.pcolormesh(x,y,sst,shading='flat',cmap=cmap) +# draw parallels and meridians, but don't bother labelling them. +m.drawparallels(numpy.arange(-90.,120.,30.)) +m.drawmeridians(numpy.arange(0.,420.,60.)) +# draw line around map projection limb. +m.drawmapboundary() +# draw horizontal colorbar. +pylab.colorbar(orientation='horizontal') +pylab.show() This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <fer...@us...> - 2007-11-22 19:38:00
|
Revision: 4423 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=4423&view=rev Author: fer_perez Date: 2007-11-22 11:37:56 -0800 (Thu, 22 Nov 2007) Log Message: ----------- Add agenda file for December 07 workshop at NCAR Added Paths: ----------- trunk/py4science/classes/0712_ncar_agenda.txt Added: trunk/py4science/classes/0712_ncar_agenda.txt =================================================================== --- trunk/py4science/classes/0712_ncar_agenda.txt (rev 0) +++ trunk/py4science/classes/0712_ncar_agenda.txt 2007-11-22 19:37:56 UTC (rev 4423) @@ -0,0 +1,142 @@ +=================================================== + Practical Scientific Computing in Python - Agenda +=================================================== + +Initials indicate who presents what: + +JDH - John D. Hunter +FP - Fernando Perez +JW - Jeff Whitaker + + +Day 1 (Friday December 7) +========================= + +830-900 Installation +This half hour will be spent helping with installation issues, before the +real workshop begins. If you've already set things up on your system +(meaning you have ipython, numpy, matplotlib and scipy installed and +running), feel free to skip this. + +900-905 Introduction +Official start of the workshop, introduce instructors. + +905-945 FP: Python for scientific computing +A high-level overview of the topic of Python in a scientific context. + +950-1045 JDH: Workflow. + +Editor: (X)Emacs, Vi(m), etc. + +ipython. Saving and reloading files, interactive use of variables, %run, +%debug, %xmode verbose. + +Getting help: + - pydoc (-g, -p) + + - The standard docs (bookmark them) + + - ipython ?/??, help(), the tab key. numpy.*cos*? search. + + - The open source process: mailing lists, wikis, svn. Python + cookbook. Participate! + + +Basic setup: + - ipython + - matplotlib (latex, etc). + - Modules: import/reload, PYTHONPATH. + + +1045:1100 --- Coffee break --- + + +1100:1215 FP: Introductory examples. + +* Qsort: lists, recursion. + +* Define a simple function: Wallis' product for pi. Illustrates arbitrary +size integers. + +* Define a trapezoid rule integrator: function objects, arrays. + +1215:1315 --- Lunch Break --- + +1315:1400 JDH: Basic numpy/pylab + +* Record arrays + +* Timeseries + +1400:1430 FP: Numerical integration and root finding: Find t such that + + \int_0^t{ f(s) ds} = u + +for a known, monotonically increasing f(s) and a fixed u. + + +1430:1500 FP: Univariate polynomials, root finding: poly1d objects, +convolutions, plotting. + +1500:1515 --- Coffee break --- + +1515:1700: JDH/FP - Optional material (there's a Christmas party) + +* Word frequencies: use of dictionaries and text processing. + +* Getbibtex: fetching bibliographic information from the net (networking, + regular expressions, command-line scripting). + +* Beautiful soup: screen-scraping HTML for data extraction. + +* Possible 3d demos (not user exercises) using VPython and VTK/MayaVi. + + +Day 2 (Saturday December 8) +=========================== + +900:945 JDH: Data fitting/smoothing: least squares, cubic splines, polynomial +fitting. Basic linear algebra. + +945:1030 FP: FFTs: 2-d image denoising via FFT. + +1030:1045 --- Coffee break --- + +1045:1130 JDH: Logistic map + +1130:1200 FP: Bessel functions: special functions library, array manipulations +to check recursion relation. + +1200:1300 --- Lunch break --- + +1300:1345 JDH: Statistics & distributions + +1345:1445 FP: + +* Montecarlo integration to compute pi. + +* Speed: weave.blitz, weave.inline. + +1445:1500 Wrapup, discussion, questions, coffee. + + + +Unused examples and exercises, extra ideas +========================================== + +* Prime numbers: the Sieve of Erathostenes. Illustrates lists and sets. + +* Visual (VPython): Show some examples, explain. Target shooting exercise. + +* Eigenfaces problem, part 1. + +* Eigenfaces problem, part 2. + +* One-dimensional FFT - Bode plot. + +* Spectral interpolation. + +* Steinman interpolation. + +* Extended precision root finding: manually implement newton's method using + clnum or mpfr. This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <js...@us...> - 2007-11-22 16:17:06
|
Revision: 4422 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=4422&view=rev Author: jswhit Date: 2007-11-22 08:17:03 -0800 (Thu, 22 Nov 2007) Log Message: ----------- fix quiver_demo Modified Paths: -------------- trunk/toolkits/basemap/Changelog trunk/toolkits/basemap/examples/quiver_demo.py Modified: trunk/toolkits/basemap/Changelog =================================================================== --- trunk/toolkits/basemap/Changelog 2007-11-22 15:45:42 UTC (rev 4421) +++ trunk/toolkits/basemap/Changelog 2007-11-22 16:17:03 UTC (rev 4422) @@ -1,4 +1,4 @@ -version 0.9.7 (svn revision 4421) +version 0.9.7 (svn revision 4422) * fixed bug in drawlsmask for 'moll','robin' and 'sinu' projections. * added lake_color keyword to fillcontinents. Modified: trunk/toolkits/basemap/examples/quiver_demo.py =================================================================== --- trunk/toolkits/basemap/examples/quiver_demo.py 2007-11-22 15:45:42 UTC (rev 4421) +++ trunk/toolkits/basemap/examples/quiver_demo.py 2007-11-22 16:17:03 UTC (rev 4422) @@ -1,6 +1,7 @@ from matplotlib.toolkits.basemap import Basemap -from pylab import show, title, arange, meshgrid, cm, figure, sqrt, \ - colorbar, axes, gca, reshape, array, Float32, quiverkey +import numpy +from pylab import show, title, arange, meshgrid, cm, figure, \ + colorbar, axes, gca, reshape, quiverkey # read in data. file = open('fcover.dat','r') @@ -12,9 +13,9 @@ ul.append(float(l[0])) vl.append(float(l[1])) pl.append(float(l[2])) -u = reshape(array(ul,Float32),(nlats,nlons)) -v = reshape(array(vl,Float32),(nlats,nlons)) -p = reshape(array(pl,Float32),(nlats,nlons)) +u = reshape(numpy.array(ul,numpy.float32),(nlats,nlons)) +v = reshape(numpy.array(vl,numpy.float32),(nlats,nlons)) +p = reshape(numpy.array(pl,numpy.float32),(nlats,nlons)) lats1 = -90.+dellat*arange(nlats) lons1 = -180.+dellon*arange(nlons) lons, lats = meshgrid(lons1, lats1) @@ -61,7 +62,7 @@ # and interpolation). nxv = 41; nyv = 41 nxp = 101; nyp = 101 -spd = sqrt(u**2+v**2) +spd = numpy.sqrt(u**2+v**2) udat, vdat, xv, yv = m.transform_vector(u,v,lons1,lats1,nxv,nyv,returnxy=True) pdat, xp, yp = m.transform_scalar(p,lons1,lats1,nxp,nyp,returnxy=True) # create a figure, add an axes. This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <js...@us...> - 2007-11-22 15:45:46
|
Revision: 4421 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=4421&view=rev Author: jswhit Date: 2007-11-22 07:45:42 -0800 (Thu, 22 Nov 2007) Log Message: ----------- release 0.9.7 Modified Paths: -------------- trunk/toolkits/basemap/Changelog Modified: trunk/toolkits/basemap/Changelog =================================================================== --- trunk/toolkits/basemap/Changelog 2007-11-22 15:44:08 UTC (rev 4420) +++ trunk/toolkits/basemap/Changelog 2007-11-22 15:45:42 UTC (rev 4421) @@ -1,4 +1,4 @@ -version 0.9.7 (not yet released) +version 0.9.7 (svn revision 4421) * fixed bug in drawlsmask for 'moll','robin' and 'sinu' projections. * added lake_color keyword to fillcontinents. This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <js...@us...> - 2007-11-22 15:44:15
|
Revision: 4420 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=4420&view=rev Author: jswhit Date: 2007-11-22 07:44:08 -0800 (Thu, 22 Nov 2007) Log Message: ----------- make basemap-testing the trunk Added Paths: ----------- trunk/toolkits/basemap/ Removed Paths: ------------- trunk/toolkits/basemap-testing/ Copied: trunk/toolkits/basemap (from rev 4418, trunk/toolkits/basemap-testing) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <js...@us...> - 2007-11-22 15:42:58
|
Revision: 4419 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=4419&view=rev Author: jswhit Date: 2007-11-22 07:42:50 -0800 (Thu, 22 Nov 2007) Log Message: ----------- rename old basemap Added Paths: ----------- trunk/toolkits/basemap-0.9.6.1/ Removed Paths: ------------- trunk/toolkits/basemap/ Copied: trunk/toolkits/basemap-0.9.6.1 (from rev 4418, trunk/toolkits/basemap) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <js...@us...> - 2007-11-22 15:28:32
|
Revision: 4418 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=4418&view=rev Author: jswhit Date: 2007-11-22 07:28:30 -0800 (Thu, 22 Nov 2007) Log Message: ----------- changed version number to 0.9.6.1 Modified Paths: -------------- trunk/toolkits/basemap/Changelog trunk/toolkits/basemap/lib/matplotlib/toolkits/basemap/basemap.py trunk/toolkits/basemap/setup.py Modified: trunk/toolkits/basemap/Changelog =================================================================== --- trunk/toolkits/basemap/Changelog 2007-11-22 03:53:04 UTC (rev 4417) +++ trunk/toolkits/basemap/Changelog 2007-11-22 15:28:30 UTC (rev 4418) @@ -1,4 +1,4 @@ -version 0.9.7 (not yet released) +version 0.9.6.1 (not yet released) * fix rotate_vector so it works in S. Hem and for non-orthogonal grids. Support for masked velocity vectors also added. (EF) * numpification. (EF) Modified: trunk/toolkits/basemap/lib/matplotlib/toolkits/basemap/basemap.py =================================================================== --- trunk/toolkits/basemap/lib/matplotlib/toolkits/basemap/basemap.py 2007-11-22 03:53:04 UTC (rev 4417) +++ trunk/toolkits/basemap/lib/matplotlib/toolkits/basemap/basemap.py 2007-11-22 15:28:30 UTC (rev 4418) @@ -22,7 +22,7 @@ # basemap data files now installed in lib/matplotlib/toolkits/basemap/data basemap_datadir = os.sep.join([os.path.dirname(__file__), 'data']) -__version__ = '0.9.7' +__version__ = '0.9.6.1' Modified: trunk/toolkits/basemap/setup.py =================================================================== --- trunk/toolkits/basemap/setup.py 2007-11-22 03:53:04 UTC (rev 4417) +++ trunk/toolkits/basemap/setup.py 2007-11-22 15:28:30 UTC (rev 4418) @@ -93,7 +93,7 @@ package_data = {'matplotlib.toolkits.basemap':pyproj_datafiles+basemap_datafiles} setup( name = "basemap", - version = "0.9.7", + version = "0.9.6.1", description = "Plot data on map projections with matplotlib", long_description = """ An add-on toolkit for matplotlib that lets you plot data This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <js...@us...> - 2007-11-22 03:53:10
|
Revision: 4417 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=4417&view=rev Author: jswhit Date: 2007-11-21 19:53:04 -0800 (Wed, 21 Nov 2007) Log Message: ----------- make sure ponds in islands in lakes are filled with correctly Modified Paths: -------------- trunk/toolkits/basemap-testing/lib/matplotlib/toolkits/basemap/basemap.py Modified: trunk/toolkits/basemap-testing/lib/matplotlib/toolkits/basemap/basemap.py =================================================================== --- trunk/toolkits/basemap-testing/lib/matplotlib/toolkits/basemap/basemap.py 2007-11-21 21:37:02 UTC (rev 4416) +++ trunk/toolkits/basemap-testing/lib/matplotlib/toolkits/basemap/basemap.py 2007-11-22 03:53:04 UTC (rev 4417) @@ -1071,7 +1071,7 @@ hasp3 = npy.sum(test1*test4) if not hasp1 or not hasp2 or not hasp3 or not hasp4: xy = zip(xa.tolist(),ya.tolist()) - if self.coastpolygontypes[np] != 2: + if self.coastpolygontypes[np] not in [2,4]: poly = Polygon(xy,facecolor=color,edgecolor=color,linewidth=0) else: # lakes filled with background color by default if lake_color is None: This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <js...@us...> - 2007-11-21 21:37:11
|
Revision: 4416 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=4416&view=rev Author: jswhit Date: 2007-11-21 13:37:02 -0800 (Wed, 21 Nov 2007) Log Message: ----------- better comments Modified Paths: -------------- trunk/py4science/examples/skel/basemap1_skel.py trunk/py4science/examples/skel/basemap2_skel.py Modified: trunk/py4science/examples/skel/basemap1_skel.py =================================================================== --- trunk/py4science/examples/skel/basemap1_skel.py 2007-11-21 21:35:59 UTC (rev 4415) +++ trunk/py4science/examples/skel/basemap1_skel.py 2007-11-21 21:37:02 UTC (rev 4416) @@ -8,9 +8,9 @@ # create map by specifying lat/lon values at corners. projection = 'lcc' # map projection resolution = XX # resolution of boundaries ('c','l','i',or 'h') -lon_0=XX # longitude of origin of map projection domain. +lon_0=XX # longitude of origin of map projection domain (degrees). lat_0=XX # standard parallel/latitude of origin of map projection domain. -llcrnrlat, llcrnrlon = XX, XX # lat/lon of lower left corner of map +llcrnrlat, llcrnrlon = XX, XX # lat/lon of lower left corner of map (degrees) urcrnrlat, urcrnrlon = XX, XX # lat/lon of upper right corner of map m = Basemap(lon_0=lon_0,lat_0=lat_0,\ llcrnrlat=llcrnrlat,llcrnrlon=llcrnrlon,\ Modified: trunk/py4science/examples/skel/basemap2_skel.py =================================================================== --- trunk/py4science/examples/skel/basemap2_skel.py 2007-11-21 21:35:59 UTC (rev 4415) +++ trunk/py4science/examples/skel/basemap2_skel.py 2007-11-21 21:37:02 UTC (rev 4416) @@ -8,7 +8,7 @@ # create map by specifying width and height in km. projection = 'lcc' # map projection resolution = XX # resolution of boundaries ('c','l','i',or 'h') -lon_0=XX # longitude of origin of map projection domain. +lon_0=XX # longitude of origin of map projection domain (degrees). lat_0=XX # standard parallel/latitude of origin of map projection domain. width = XX # width of map projecton domain in km. height = XX # height of map projection domain in km. @@ -23,5 +23,4 @@ m.drawcountries() m.drawstates() pylab.title('map region specified using width and height') -pylab.savefig('basemap2.eps') -pylab.savefig('basemap2.png') +pylab.show() This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <js...@us...> - 2007-11-21 21:36:04
|
Revision: 4415 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=4415&view=rev Author: jswhit Date: 2007-11-21 13:35:59 -0800 (Wed, 21 Nov 2007) Log Message: ----------- add skeleton scripts Added Paths: ----------- trunk/py4science/examples/skel/basemap1_skel.py trunk/py4science/examples/skel/basemap2_skel.py Added: trunk/py4science/examples/skel/basemap1_skel.py =================================================================== --- trunk/py4science/examples/skel/basemap1_skel.py (rev 0) +++ trunk/py4science/examples/skel/basemap1_skel.py 2007-11-21 21:35:59 UTC (rev 4415) @@ -0,0 +1,27 @@ +import pylab, numpy +from matplotlib.toolkits.basemap import Basemap + +# create figure. +# background color will be used for 'wet' areas. +fig = pylab.figure() +fig.add_axes([0.1,0.1,0.8,0.8],axisbg='aqua') +# create map by specifying lat/lon values at corners. +projection = 'lcc' # map projection +resolution = XX # resolution of boundaries ('c','l','i',or 'h') +lon_0=XX # longitude of origin of map projection domain. +lat_0=XX # standard parallel/latitude of origin of map projection domain. +llcrnrlat, llcrnrlon = XX, XX # lat/lon of lower left corner of map +urcrnrlat, urcrnrlon = XX, XX # lat/lon of upper right corner of map +m = Basemap(lon_0=lon_0,lat_0=lat_0,\ + llcrnrlat=llcrnrlat,llcrnrlon=llcrnrlon,\ + urcrnrlat=urcrnrlat,urcrnrlon=urcrnrlon,\ + resolution=resolution,projection=projection) +# draw coastlines. Make liness a little thinner than default. +m.drawcoastlines(linewidth=0.5) +# fill continents. +m.fillcontinents(color='coral') +# draw states and countries. +m.drawcountries() +m.drawstates() +pylab.title('map region specified using corner lat/lon values') +pylab.show() Added: trunk/py4science/examples/skel/basemap2_skel.py =================================================================== --- trunk/py4science/examples/skel/basemap2_skel.py (rev 0) +++ trunk/py4science/examples/skel/basemap2_skel.py 2007-11-21 21:35:59 UTC (rev 4415) @@ -0,0 +1,27 @@ +import pylab, numpy +from matplotlib.toolkits.basemap import Basemap + +# create figure. +# background color will be used for 'wet' areas. +fig = pylab.figure() +fig.add_axes([0.1,0.1,0.8,0.8],axisbg='aqua') +# create map by specifying width and height in km. +projection = 'lcc' # map projection +resolution = XX # resolution of boundaries ('c','l','i',or 'h') +lon_0=XX # longitude of origin of map projection domain. +lat_0=XX # standard parallel/latitude of origin of map projection domain. +width = XX # width of map projecton domain in km. +height = XX # height of map projection domain in km. +m = Basemap(lon_0=lon_0,lat_0=lat_0,\ + width=width,height=height,\ + resolution=resolution,projection=projection) +# draw coastlines. +m.drawcoastlines(linewidth=0.5) +# fill continents. +m.fillcontinents(color='coral') +# draw states and countries. +m.drawcountries() +m.drawstates() +pylab.title('map region specified using width and height') +pylab.savefig('basemap2.eps') +pylab.savefig('basemap2.png') This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <js...@us...> - 2007-11-21 21:33:43
|
Revision: 4414 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=4414&view=rev Author: jswhit Date: 2007-11-21 13:33:25 -0800 (Wed, 21 Nov 2007) Log Message: ----------- bug fixes Modified Paths: -------------- trunk/py4science/examples/basemap1.py trunk/py4science/examples/basemap2.py Modified: trunk/py4science/examples/basemap1.py =================================================================== --- trunk/py4science/examples/basemap1.py 2007-11-21 21:25:27 UTC (rev 4413) +++ trunk/py4science/examples/basemap1.py 2007-11-21 21:33:25 UTC (rev 4414) @@ -7,12 +7,12 @@ fig.add_axes([0.1,0.1,0.8,0.8],axisbg='aqua') # create map by specifying lat/lon values at corners. resolution = 'l' +projection = 'lcc' +lat_0 = 60 lon_0 = -50 -lat_0 = 60 -projection = 'lcc' llcrnrlat, llcrnrlon = 8, -92 urcrnrlat, urcrnrlon = 39, 63 -m = Basemap(lon_0=lon_0,lat_0=lat_0,\ +m = Basemap(lat_0=lat_0,lon_0=lon_0,\ llcrnrlat=llcrnrlat,llcrnrlon=llcrnrlon,\ urcrnrlat=urcrnrlat,urcrnrlon=urcrnrlon,\ resolution=resolution,projection=projection) Modified: trunk/py4science/examples/basemap2.py =================================================================== --- trunk/py4science/examples/basemap2.py 2007-11-21 21:25:27 UTC (rev 4413) +++ trunk/py4science/examples/basemap2.py 2007-11-21 21:33:25 UTC (rev 4414) @@ -7,9 +7,9 @@ fig.add_axes([0.1,0.1,0.8,0.8],axisbg='aqua') # create map by specifying width and height in km. resolution = 'l' +projection = 'lcc' lon_0 = -50 lat_0 = 60 -projection = 'lcc' width = 12000000 height = 0.75*width m = Basemap(lon_0=lon_0,lat_0=lat_0,\ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <js...@us...> - 2007-11-21 21:25:29
|
Revision: 4413 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=4413&view=rev Author: jswhit Date: 2007-11-21 13:25:27 -0800 (Wed, 21 Nov 2007) Log Message: ----------- fix error message Modified Paths: -------------- trunk/toolkits/basemap-testing/lib/matplotlib/toolkits/basemap/basemap.py Modified: trunk/toolkits/basemap-testing/lib/matplotlib/toolkits/basemap/basemap.py =================================================================== --- trunk/toolkits/basemap-testing/lib/matplotlib/toolkits/basemap/basemap.py 2007-11-21 20:53:42 UTC (rev 4412) +++ trunk/toolkits/basemap-testing/lib/matplotlib/toolkits/basemap/basemap.py 2007-11-21 21:25:27 UTC (rev 4413) @@ -334,7 +334,7 @@ lat_1 = lat_0 projparams['lat_1'] = lat_1 if lat_1 is None or lon_0 is None: - raise ValueError('must specify lat_1 or lat_0 and lon_0 for %(projection)s basemap (lat_2 is optional)' % _projnames) + raise ValueError('must specify lat_1 or lat_0 and lon_0 for %s basemap (lat_2 is optional)' % _projnames[projection]) if lat_2 is None: projparams['lat_2'] = lat_1 if not using_corners: @@ -360,7 +360,7 @@ 'splaea', 'nplaea', 'spaeqd', 'npaeqd']: if boundinglat is None or lon_0 is None: - raise ValueError('must specify boundinglat and lon_0 for %(projection) basemap' % _projnames) + raise ValueError('must specify boundinglat and lon_0 for %s basemap' % _projnames[projection]) if projection[0] == 's': sgn = -1 else: @@ -377,7 +377,7 @@ lon,self.llcrnrlat = proj(math.sqrt(2.)*y,0.,inverse=True) self.urcrnrlat = self.llcrnrlat if width is not None or height is not None: - print 'warning: width and height keywords ignored for %s projection' % self.projection + print 'warning: width and height keywords ignored for %s projection' % _projnames[projection] elif projection == 'laea': if lat_0 is None or lon_0 is None: raise ValueError, 'must specify lat_0 and lon_0 for Lambert Azimuthal basemap' This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <js...@us...> - 2007-11-21 20:53:59
|
Revision: 4412 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=4412&view=rev Author: jswhit Date: 2007-11-21 12:53:42 -0800 (Wed, 21 Nov 2007) Log Message: ----------- added data for basemap5.py example Added Paths: ----------- trunk/py4science/examples/data/sst.nc Added: trunk/py4science/examples/data/sst.nc =================================================================== (Binary files differ) Property changes on: trunk/py4science/examples/data/sst.nc ___________________________________________________________________ Name: svn:mime-type + application/octet-stream This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |