SF.net SVN: matplotlib: [5166] trunk/toolkits/basemap/examples

2008-05-17 Thread jswhit
Revision: 5166
  http://matplotlib.svn.sourceforge.net/matplotlib/?rev=5166&view=rev
Author:   jswhit
Date: 2008-05-17 04:52:15 -0700 (Sat, 17 May 2008)

Log Message:
---
convert to pyplot/numpy namespace

Modified Paths:
--
trunk/toolkits/basemap/examples/plotmap.py
trunk/toolkits/basemap/examples/plotmap_masked.py
trunk/toolkits/basemap/examples/plotmap_oo.py

Modified: trunk/toolkits/basemap/examples/plotmap.py
===
--- trunk/toolkits/basemap/examples/plotmap.py  2008-05-16 22:47:00 UTC (rev 
5165)
+++ trunk/toolkits/basemap/examples/plotmap.py  2008-05-17 11:52:15 UTC (rev 
5166)
@@ -5,14 +5,15 @@
 # the data is interpolated to the native projection grid.
 
 from mpl_toolkits.basemap import Basemap, shiftgrid
-from pylab import title, colorbar, show, axes, cm, load, arange, figure, \
-  text
+import numpy as np
+import matplotlib.pyplot as plt
+import matplotlib.mlab as mlab
 
 # read in topo data (on a regular lat/lon grid)
 # longitudes go from 20 to 380.
-topoin = load('etopo20data.gz')
-lons = load('etopo20lons.gz')
-lats = load('etopo20lats.gz')
+topoin = mlab.load('etopo20data.gz')
+lons = mlab.load('etopo20lons.gz')
+lats = mlab.load('etopo20lats.gz')
 # shift data so lons go from -180 to 180 instead of 20 to 380.
 topoin,lons = shiftgrid(180.,topoin,lons,start=False)
 
@@ -26,31 +27,32 @@
 nx = int((m.xmax-m.xmin)/4.)+1; ny = int((m.ymax-m.ymin)/4.)+1
 topodat,x,y = m.transform_scalar(topoin,lons,lats,nx,ny,returnxy=True)
 # create the figure.
-fig=figure(figsize=(8,8))
+fig=plt.figure(figsize=(8,8))
 # add an axes, leaving room for colorbar on the right.
 ax = fig.add_axes([0.1,0.1,0.7,0.7])
 # plot image over map with imshow.
-im = m.imshow(topodat,cm.jet)
+im = m.imshow(topodat,plt.cm.jet)
 # setup colorbar axes instance.
 pos = ax.get_position()
 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
+cax = plt.axes([l+w+0.075, b, 0.05, h])
+plt.colorbar(cax=cax) # draw colorbar
+plt.axes(ax)  # make the original axes current again
 # plot blue dot on boulder, colorado and label it as such.
 xpt,ypt = m(-104.237,40.125) 
 m.plot([xpt],[ypt],'bo') 
-text(xpt+10,ypt+10,'Boulder')
+plt.text(xpt+10,ypt+10,'Boulder')
 # draw coastlines and political boundaries.
 m.drawcoastlines()
 m.drawcountries()
 m.drawstates()
 # draw parallels and meridians.
 # label on left, right and bottom of map.
-parallels = arange(0.,80,20.)
+parallels = np.arange(0.,80,20.)
 m.drawparallels(parallels,labels=[1,1,0,1])
-meridians = arange(10.,360.,30.)
+meridians = np.arange(10.,360.,30.)
 m.drawmeridians(meridians,labels=[1,1,0,1])
 # set title.
-title('ETOPO Topography - Lambert Conformal Conic')
-show()
+plt.title('ETOPO Topography - Lambert Conformal Conic')
+#plt.savefig('plotmap.pdf')
+plt.show()

Modified: trunk/toolkits/basemap/examples/plotmap_masked.py
===
--- trunk/toolkits/basemap/examples/plotmap_masked.py   2008-05-16 22:47:00 UTC 
(rev 5165)
+++ trunk/toolkits/basemap/examples/plotmap_masked.py   2008-05-17 11:52:15 UTC 
(rev 5166)
@@ -6,16 +6,17 @@
 # (in this case the oceans)
 
 from mpl_toolkits.basemap import Basemap, shiftgrid
-from pylab import title, colorbar, show, axes, cm, load, arange, figure, \
-  text, where
 from numpy import ma
+import numpy as np
+import matplotlib.pyplot as plt
+import matplotlib.mlab as mlab
 import matplotlib.colors as colors
 
 # read in topo data (on a regular lat/lon grid)
 # longitudes go from 20 to 380.
-topoin = load('etopo20data.gz')
-lonsin = load('etopo20lons.gz')
-latsin = load('etopo20lats.gz')
+topoin = mlab.load('etopo20data.gz')
+lonsin = mlab.load('etopo20lons.gz')
+latsin = mlab.load('etopo20lats.gz')
 # shift data so lons go from -180 to 180 instead of 20 to 380.
 topoin,lonsin = shiftgrid(180.,topoin,lonsin,start=False)
 
@@ -29,36 +30,36 @@
 nx = int((m.xmax-m.xmin)/4.)+1; ny = int((m.ymax-m.ymin)/4.)+1
 topodat,x,y = m.transform_scalar(topoin,lonsin,latsin,nx,ny,returnxy=True)
 # create the figure.
-fig=figure(figsize=(8,8))
+fig=plt.figure(figsize=(8,8))
 # add an axes, leaving room for colorbar on the right.
 ax = fig.add_axes([0.1,0.1,0.7,0.7])
 # make topodat a masked array, masking values lower than sea level.
-topodat = where(topodat < 0.,1.e10,topodat)
+topodat = np.where(topodat < 0.,1.e10,topodat)
 topodatm = ma.masked_values(topodat, 1.e10)
-palette = cm.YlOrRd
+palette = plt.cm.YlOrRd
 palette.set_bad('aqua', 1.0)
 # 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.
 pos = ax.get_position()
 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 origin

SF.net SVN: matplotlib: [5167] trunk/toolkits/basemap/examples/wiki_example .py

2008-05-17 Thread jswhit
Revision: 5167
  http://matplotlib.svn.sourceforge.net/matplotlib/?rev=5167&view=rev
Author:   jswhit
Date: 2008-05-17 05:04:34 -0700 (Sat, 17 May 2008)

Log Message:
---
convert to pyplot/numpy namespace.

Modified Paths:
--
trunk/toolkits/basemap/examples/wiki_example.py

Modified: trunk/toolkits/basemap/examples/wiki_example.py
===
--- trunk/toolkits/basemap/examples/wiki_example.py 2008-05-17 11:52:15 UTC 
(rev 5166)
+++ trunk/toolkits/basemap/examples/wiki_example.py 2008-05-17 12:04:34 UTC 
(rev 5167)
@@ -1,5 +1,6 @@
 from mpl_toolkits.basemap import Basemap
-import pylab as p
+import matplotlib.pyplot as plt
+import numpy as np
 # set up orthographic map projection with
 # perspective of satellite looking down at 50N, 100W.
 # use low resolution coastlines.
@@ -11,63 +12,41 @@
 # draw the edge of the map projection region (the projection limb)
 map.drawmapboundary()
 # draw lat/lon grid lines every 30 degrees.
-map.drawmeridians(p.arange(0,360,30))
-map.drawparallels(p.arange(-90,90,30))
+map.drawmeridians(np.arange(0,360,30))
+map.drawparallels(np.arange(-90,90,30))
 # lat/lon coordinates of five cities.
 lats=[40.02,32.73,38.55,48.25,17.29]
 lons=[-105.16,-117.16,-77.00,-114.21,-88.10]
 cities=['Boulder, CO','San Diego, CA',
 'Washington, DC','Whitefish, MT','Belize City, Belize']
 # compute the native map projection coordinates for cities.
-x,y = map(lons,lats)
+xc,yc = map(lons,lats)
 # plot filled circles at the locations of the cities.
-map.plot(x,y,'bo')
+map.plot(xc,yc,'bo')
 # plot the names of those five cities.
-for name,xpt,ypt in zip(cities,x,y):
-p.text(xpt+5,ypt+5,name,fontsize=9)
+for name,xpt,ypt in zip(cities,xc,yc):
+plt.text(xpt+5,ypt+5,name,fontsize=9)
 # make up some data on a regular lat/lon grid.
-nlats = 73; nlons = 145; delta = 2.*p.pi/(nlons-1)
-lats = (0.5*p.pi-delta*p.indices((nlats,nlons))[0,:,:])
-lons = (delta*p.indices((nlats,nlons))[1,:,:])
-wave = 0.75*(p.sin(2.*lats)**8*p.cos(4.*lons))
-mean = 0.5*p.cos(2.*lats)*((p.sin(2.*lats))**2 + 2.)
+nlats = 73; nlons = 145; delta = 2.*np.pi/(nlons-1)
+lats = (0.5*np.pi-delta*np.indices((nlats,nlons))[0,:,:])
+lons = (delta*np.indices((nlats,nlons))[1,:,:])
+wave = 0.75*(np.sin(2.*lats)**8*np.cos(4.*lons))
+mean = 0.5*np.cos(2.*lats)*((np.sin(2.*lats))**2 + 2.)
 # compute native map projection coordinates of lat/lon grid.
-x, y = map(lons*180./p.pi, lats*180./p.pi)
+x, y = map(lons*180./np.pi, lats*180./np.pi)
 # contour data over the map.
 cs = map.contour(x,y,wave+mean,15,linewidths=1.5)
 
 # as above, but use blue marble image as map background.
-fig = p.figure()
-map = Basemap(projection='ortho',lat_0=50,lon_0=-100,resolution='l')
+fig = plt.figure()
 map.drawmapboundary()
-map.drawmeridians(p.arange(0,360,30))
-map.drawparallels(p.arange(-90,90,30))
-# lat/lon coordinates of five cities.
-lats=[40.02,32.73,38.55,48.25,17.29]
-lons=[-105.16,-117.16,-77.00,-114.21,-88.10]
-cities=['Boulder, CO','San Diego, CA',
-'Washington, DC','Whitefish, MT','Belize City, Belize']
-# compute the native map projection coordinates for cities.
-x,y = map(lons,lats)
-# plot filled circles at the locations of the cities.
-map.plot(x,y,'yo')
-# plot the names of those five cities.
-for name,xpt,ypt in zip(cities,x,y):
-p.text(xpt+5,ypt+5,name,fontsize=9,color='w')
-# make up some data on a regular lat/lon grid.
-nlats = 73; nlons = 145; delta = 2.*p.pi/(nlons-1)
-lats = (0.5*p.pi-delta*p.indices((nlats,nlons))[0,:,:])
-lons = (delta*p.indices((nlats,nlons))[1,:,:])
-wave = 0.75*(p.sin(2.*lats)**8*p.cos(4.*lons))
-mean = 0.5*p.cos(2.*lats)*((p.sin(2.*lats))**2 + 2.)
-# compute native map projection coordinates of lat/lon grid.
-x, y = map(lons*180./p.pi, lats*180./p.pi)
+map.drawmeridians(np.arange(0,360,30))
+map.drawparallels(np.arange(-90,90,30))
+# plot the names of five cities.
+for name,xpt,ypt in zip(cities,xc,yc):
+plt.text(xpt+5,ypt+5,name,fontsize=9,color='w')
 # contour data over the map.
 cs = map.contour(x,y,wave+mean,15,linewidths=1.5)
 # draw blue marble image in background.
 map.bluemarble()
-p.show()
-
-#p.savefig('wiki_example.ps')
-
-
+plt.show()


This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.

-
This SF.net email is sponsored by: Microsoft 
Defy all challenges. Microsoft(R) Visual Studio 2008. 
http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/
___
Matplotlib-checkins mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/matplotlib-checkins


SF.net SVN: matplotlib: [5168] trunk/toolkits/basemap/examples/contour_demo .py

2008-05-17 Thread jswhit
Revision: 5168
  http://matplotlib.svn.sourceforge.net/matplotlib/?rev=5168&view=rev
Author:   jswhit
Date: 2008-05-17 05:22:09 -0700 (Sat, 17 May 2008)

Log Message:
---
convert to pyplot/numpy namespace

Modified Paths:
--
trunk/toolkits/basemap/examples/contour_demo.py

Modified: trunk/toolkits/basemap/examples/contour_demo.py
===
--- trunk/toolkits/basemap/examples/contour_demo.py 2008-05-17 12:04:34 UTC 
(rev 5167)
+++ trunk/toolkits/basemap/examples/contour_demo.py 2008-05-17 12:22:09 UTC 
(rev 5168)
@@ -1,124 +1,125 @@
 from mpl_toolkits.basemap import Basemap, shiftgrid
-from pylab import load, show, colorbar, axes, gca,\
-  figure, title, meshgrid, cm, arange
+import numpy as np
+import matplotlib.pyplot as plt
+import matplotlib.mlab as mlab
 
 # examples of filled contour plots on map projections.
 
 # read in data on lat/lon grid.
-hgt = load('500hgtdata.gz')
-lons = load('500hgtlons.gz')
-lats = load('500hgtlats.gz')
+hgt = mlab.load('500hgtdata.gz')
+lons = mlab.load('500hgtlons.gz')
+lats = mlab.load('500hgtlats.gz')
 # shift data so lons go from -180 to 180 instead of 0 to 360.
 hgt,lons = shiftgrid(180.,hgt,lons,start=False)
-lons, lats = meshgrid(lons, lats)
+lons, lats = np.meshgrid(lons, lats)
 
 # create new figure
-fig=figure()
+fig=plt.figure()
 # setup of sinusoidal basemap
 m = Basemap(resolution='c',projection='sinu',lon_0=0)
 ax = fig.add_axes([0.1,0.1,0.7,0.7])
 # make a filled contour plot.
 x, y = m(lons, lats)
 CS = m.contour(x,y,hgt,15,linewidths=0.5,colors='k')
-CS = m.contourf(x,y,hgt,15,cmap=cm.jet)
+CS = m.contourf(x,y,hgt,15,cmap=plt.cm.jet)
 # setup colorbar axes instance.
 pos = ax.get_position()
 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
+cax = plt.axes([l+w+0.075, b, 0.05, h]) # setup colorbar axes
+plt.colorbar(drawedges=True, cax=cax) # draw colorbar
+plt.axes(ax)  # make the original axes current again
 # draw coastlines and political boundaries.
 m.drawcoastlines()
 m.drawmapboundary()
 m.fillcontinents()
 # draw parallels and meridians.
-parallels = arange(-60.,90,30.)
+parallels = np.arange(-60.,90,30.)
 m.drawparallels(parallels,labels=[1,0,0,0])
-meridians = arange(-360.,360.,30.)
+meridians = np.arange(-360.,360.,30.)
 m.drawmeridians(meridians)
-title('Sinusoidal Filled Contour Demo')
+plt.title('Sinusoidal Filled Contour Demo')
 print 'plotting with sinusoidal basemap ...'
 
 # create new figure
-fig=figure()
+fig=plt.figure()
 # setup of mollweide basemap
 m = Basemap(resolution='c',projection='moll',lon_0=0)
 ax = fig.add_axes([0.1,0.1,0.7,0.7])
 # make a filled contour plot.
 x, y = m(lons, lats)
 CS = m.contour(x,y,hgt,15,linewidths=0.5,colors='k')
-CS = m.contourf(x,y,hgt,15,cmap=cm.jet)
+CS = m.contourf(x,y,hgt,15,cmap=plt.cm.jet)
 pos = ax.get_position()
 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
+cax = plt.axes([l+w+0.075, b, 0.05, h]) # setup colorbar axes
+plt.colorbar(drawedges=True, cax=cax) # draw colorbar
+plt.axes(ax)  # make the original axes current again
 # draw coastlines and political boundaries.
 m.drawcoastlines()
 m.drawmapboundary()
 m.fillcontinents()
 # draw parallels and meridians.
-parallels = arange(-60.,90,30.)
+parallels = np.arange(-60.,90,30.)
 m.drawparallels(parallels,labels=[1,0,0,0])
-meridians = arange(-360.,360.,30.)
+meridians = np.arange(-360.,360.,30.)
 m.drawmeridians(meridians)
-title('Mollweide Filled Contour Demo')
+plt.title('Mollweide Filled Contour Demo')
 print 'plotting with mollweide basemap ...'
 
 # create new figure
-fig=figure()
+fig=plt.figure()
 # set up Robinson map projection.
 m = Basemap(resolution='c',projection='robin',lon_0=0)
 ax = fig.add_axes([0.1,0.1,0.7,0.7])
 # make a filled contour plot.
 x, y = m(lons, lats)
 CS = m.contour(x,y,hgt,15,linewidths=0.5,colors='k')
-CS = m.contourf(x,y,hgt,15,cmap=cm.jet)
+CS = m.contourf(x,y,hgt,15,cmap=plt.cm.jet)
 pos = ax.get_position()
 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
+cax = plt.axes([l+w+0.075, b, 0.05, h]) # setup colorbar axes
+plt.colorbar(drawedges=True, cax=cax) # draw colorbar
+plt.axes(ax)  # make the original axes current again
 # draw coastlines and political boundaries.
 m.drawcoastlines()
 m.drawmapboundary()
 m.fillcontinents()
 # draw parallels and meridians.
-parallels = arange(-60.,90,30.)
+parallels = np.arange(-60.,90,30.)
 m.drawparallels(parallels,labels=[1,0,0,0])
-meridians = arange(-360.,360.,60.)
+meridians = np.arange(-360.,360.,60.)
 m.drawmeridians(meridians,labels=[0,0,0,1

SF.net SVN: matplotlib: [5169] trunk/toolkits/basemap/examples/warpimage.py

2008-05-17 Thread jswhit
Revision: 5169
  http://matplotlib.svn.sourceforge.net/matplotlib/?rev=5169&view=rev
Author:   jswhit
Date: 2008-05-17 06:33:42 -0700 (Sat, 17 May 2008)

Log Message:
---
convert to pyplot/numpy namespace

Modified Paths:
--
trunk/toolkits/basemap/examples/warpimage.py

Modified: trunk/toolkits/basemap/examples/warpimage.py
===
--- trunk/toolkits/basemap/examples/warpimage.py2008-05-17 12:22:09 UTC 
(rev 5168)
+++ trunk/toolkits/basemap/examples/warpimage.py2008-05-17 13:33:42 UTC 
(rev 5169)
@@ -1,13 +1,13 @@
-import pylab as P
-import numpy
 from mpl_toolkits.basemap import Basemap
+import numpy as np
+import matplotlib.pyplot as plt
 
 # illustrate use of warpimage method to display an image background
 # on the map projection region.  Default background is the 'blue
 # marble' image from NASA (http://visibleearth.nasa.gov).
 
 # create new figure
-fig=P.figure()
+fig=plt.figure()
 # define orthographic projection centered on North America.
 m = Basemap(projection='ortho',lat_0=40,lon_0=-100,resolution='l')
 # display a non-default image.
@@ -15,17 +15,17 @@
 # draw coastlines.
 m.drawcoastlines(linewidth=0.5,color='0.5')
 # draw lat/lon grid lines every 30 degrees.
-m.drawmeridians(numpy.arange(0,360,30),color='0.5')
-m.drawparallels(numpy.arange(-90,90,30),color='0.5')
-P.title("Lights at Night image warped from 'cyl' to 'ortho' 
projection",fontsize=12)
+m.drawmeridians(np.arange(0,360,30),color='0.5')
+m.drawparallels(np.arange(-90,90,30),color='0.5')
+plt.title("Lights at Night image warped from 'cyl' to 'ortho' 
projection",fontsize=12)
 print 'warp to orthographic map ...'
 
 # redisplay (same image specified) should be fast since data is cached.
-fig = P.figure()
+fig = plt.figure()
 m.warpimage(image='earth_lights_lrg.jpg')
 
 # create new figure
-fig=P.figure()
+fig=plt.figure()
 # define cylindrical equidistant projection.
 m = 
Basemap(projection='cyl',llcrnrlon=-180,llcrnrlat=-90,urcrnrlon=180,urcrnrlat=90,resolution='l')
 # plot (unwarped) rgba image.
@@ -33,13 +33,13 @@
 # draw coastlines.
 m.drawcoastlines(linewidth=0.5,color='0.5')
 # draw lat/lon grid lines.
-m.drawmeridians(numpy.arange(-180,180,60),labels=[0,0,0,1],color='0.5')
-m.drawparallels(numpy.arange(-90,90,30),labels=[1,0,0,0],color='0.5')
-P.title("Blue Marble image - native 'cyl' projection",fontsize=12)
+m.drawmeridians(np.arange(-180,180,60),labels=[0,0,0,1],color='0.5')
+m.drawparallels(np.arange(-90,90,30),labels=[1,0,0,0],color='0.5')
+plt.title("Blue Marble image - native 'cyl' projection",fontsize=12)
 print 'plot cylindrical map (no warping needed) ...'
 
 # create new figure
-fig=P.figure()
+fig=plt.figure()
 # define orthographic projection centered on Europe.
 m = Basemap(projection='ortho',lat_0=40,lon_0=40,resolution='l')
 # plot warped rgba image.
@@ -47,13 +47,13 @@
 # draw coastlines.
 m.drawcoastlines(linewidth=0.5,color='0.5')
 # draw lat/lon grid lines every 30 degrees.
-m.drawmeridians(numpy.arange(0,360,30),color='0.5')
-m.drawparallels(numpy.arange(-90,90,30),color='0.5')
-P.title("Blue Marble image warped from 'cyl' to 'ortho' 
projection",fontsize=12)
+m.drawmeridians(np.arange(0,360,30),color='0.5')
+m.drawparallels(np.arange(-90,90,30),color='0.5')
+plt.title("Blue Marble image warped from 'cyl' to 'ortho' 
projection",fontsize=12)
 print 'warp to orthographic map ...'
 
 # create new figure
-fig=P.figure()
+fig=plt.figure()
 # define Lambert Conformal basemap for North America.
 m = Basemap(llcrnrlon=-145.5,llcrnrlat=1.,urcrnrlon=-2.566,urcrnrlat=46.352,\
 rsphere=(6378137.00,6356752.3142),lat_1=50.,lon_0=-107.,\
@@ -63,15 +63,15 @@
 m.drawcoastlines(linewidth=0.5,color='0.5')
 # draw parallels and meridians.
 # label on left, right and bottom of map.
-parallels = numpy.arange(0.,80,20.)
+parallels = np.arange(0.,80,20.)
 m.drawparallels(parallels,labels=[1,1,0,1],color='0.5')
-meridians = numpy.arange(10.,360.,30.)
+meridians = np.arange(10.,360.,30.)
 m.drawmeridians(meridians,labels=[1,1,0,1],color='0.5')
-P.title("Blue Marble image warped from 'cyl' to 'lcc' projection",fontsize=12)
+plt.title("Blue Marble image warped from 'cyl' to 'lcc' 
projection",fontsize=12)
 print 'warp to lambert conformal map ...'
 
 # create new figure
-fig=P.figure()
+fig=plt.figure()
 # define oblique mercator map.
 m = Basemap(height=2400,width=1200,
 resolution=None,projection='omerc',\
@@ -79,9 +79,9 @@
 # plot warped rgba image.
 im = m.bluemarble()
 # draw lat/lon grid lines every 20 degrees.
-m.drawmeridians(numpy.arange(0,360,20),color='0.5')
-m.drawparallels(numpy.arange(-80,81,20),color='0.5')
-P.title("Blue Marble image warped from 'cyl' to 'omerc' 
projection",fontsize=12)
+m.drawmeridians(np.arange(0,360,20),color='0.5')
+m.drawparallels(np.arange(-80,81,20),color='0.5')
+plt.title("Blue Marble image warped from 'cyl' to 'omerc' 
projection",fontsize=12)
 pr

SF.net SVN: matplotlib: [5170] trunk/matplotlib/lib/matplotlib/backends/ backend_agg.py

2008-05-17 Thread efiring
Revision: 5170
  http://matplotlib.svn.sourceforge.net/matplotlib/?rev=5170&view=rev
Author:   efiring
Date: 2008-05-17 10:05:36 -0700 (Sat, 17 May 2008)

Log Message:
---
Open png files in binary mode; bug found by J?\195?\182rgen Stenarson

Modified Paths:
--
trunk/matplotlib/lib/matplotlib/backends/backend_agg.py

Modified: trunk/matplotlib/lib/matplotlib/backends/backend_agg.py
===
--- trunk/matplotlib/lib/matplotlib/backends/backend_agg.py 2008-05-17 
13:33:42 UTC (rev 5169)
+++ trunk/matplotlib/lib/matplotlib/backends/backend_agg.py 2008-05-17 
17:05:36 UTC (rev 5170)
@@ -290,7 +290,7 @@
 original_dpi = renderer.dpi
 renderer.dpi = self.figure.dpi
 if type(filename_or_obj) in (str, unicode):
-filename_or_obj = open(filename_or_obj, 'w')
+filename_or_obj = open(filename_or_obj, 'wb')
 renderer._renderer.write_rgba(filename_or_obj)
 renderer.dpi = original_dpi
 print_rgba = print_raw
@@ -301,6 +301,6 @@
 original_dpi = renderer.dpi
 renderer.dpi = self.figure.dpi
 if type(filename_or_obj) in (str, unicode):
-filename_or_obj = open(filename_or_obj, 'w')
+filename_or_obj = open(filename_or_obj, 'wb')
 self.get_renderer()._renderer.write_png(filename_or_obj, 
self.figure.dpi)
 renderer.dpi = original_dpi


This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.

-
This SF.net email is sponsored by: Microsoft 
Defy all challenges. Microsoft(R) Visual Studio 2008. 
http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/
___
Matplotlib-checkins mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/matplotlib-checkins


SF.net SVN: matplotlib: [5171] branches/v0_91_maint

2008-05-17 Thread jdh2358
Revision: 5171
  http://matplotlib.svn.sourceforge.net/matplotlib/?rev=5171&view=rev
Author:   jdh2358
Date: 2008-05-17 13:57:13 -0700 (Sat, 17 May 2008)

Log Message:
---
made backend agg open png in binary mode

Modified Paths:
--
branches/v0_91_maint/examples/embedding_in_gtk2.py
branches/v0_91_maint/examples/embedding_in_tk.py
branches/v0_91_maint/examples/embedding_in_tk2.py
branches/v0_91_maint/examples/mathtext_demo.py
branches/v0_91_maint/examples/mathtext_examples.py
branches/v0_91_maint/lib/matplotlib/backends/backend_agg.py

Modified: branches/v0_91_maint/examples/embedding_in_gtk2.py
===
--- branches/v0_91_maint/examples/embedding_in_gtk2.py  2008-05-17 17:05:36 UTC 
(rev 5170)
+++ branches/v0_91_maint/examples/embedding_in_gtk2.py  2008-05-17 20:57:13 UTC 
(rev 5171)
@@ -5,7 +5,6 @@
 """
 import gtk
 
-from matplotlib.axes import Subplot
 from matplotlib.figure import Figure
 from numpy import arange, sin, pi
 

Modified: branches/v0_91_maint/examples/embedding_in_tk.py
===
--- branches/v0_91_maint/examples/embedding_in_tk.py2008-05-17 17:05:36 UTC 
(rev 5170)
+++ branches/v0_91_maint/examples/embedding_in_tk.py2008-05-17 20:57:13 UTC 
(rev 5171)
@@ -1,7 +1,4 @@
 #!/usr/bin/env python
-import matplotlib
-matplotlib.use('TkAgg')
-
 from numpy import arange, sin, pi
 from matplotlib.axes import Subplot
 from matplotlib.backends.backend_tkagg import FigureCanvasTkAgg, 
NavigationToolbar2TkAgg

Modified: branches/v0_91_maint/examples/embedding_in_tk2.py
===
--- branches/v0_91_maint/examples/embedding_in_tk2.py   2008-05-17 17:05:36 UTC 
(rev 5170)
+++ branches/v0_91_maint/examples/embedding_in_tk2.py   2008-05-17 20:57:13 UTC 
(rev 5171)
@@ -1,43 +1,38 @@
 #!/usr/bin/env python
-import matplotlib
-matplotlib.use('TkAgg')
-
-from numpy import arange, sin, pi
-from matplotlib.axes import Subplot
-from matplotlib.backends.backend_tkagg import FigureCanvasTkAgg, 
NavigationToolbar2TkAgg
-from matplotlib.figure import Figure
-
 import Tkinter as Tk
-import sys
+import numpy as np
+import matplotlib.backends.backend_tkagg as backend
+import matplotlib.figure as mfigure
 
-def destroy(e): sys.exit()
 
 root = Tk.Tk()
 root.wm_title("Embedding in TK")
-#root.bind("", destroy)
 
+fig = mfigure.Figure(figsize=(5,4), dpi=100)
+ax = fig.add_subplot(111)
+t = np.arange(0.0,3.0,0.01)
+s = np.sin(2*np.pi*t)
 
-f = Figure(figsize=(5,4), dpi=100)
-a = f.add_subplot(111)
-t = arange(0.0,3.0,0.01)
-s = sin(2*pi*t)
+ax.plot(t,s)
+ax.grid(True)
+ax.set_title('Tk embedding')
+ax.set_xlabel('time (s)')
+ax.set_ylabel('volts (V)')
 
-a.plot(t,s)
-a.set_title('Tk embedding')
-a.set_xlabel('X axis label')
-a.set_ylabel('Y label')
 
-
 # a tk.DrawingArea
-canvas = FigureCanvasTkAgg(f, master=root)
+canvas = backend.FigureCanvasTkAgg(fig, master=root)
 canvas.show()
 canvas.get_tk_widget().pack(side=Tk.TOP, fill=Tk.BOTH, expand=1)
 
-#toolbar = NavigationToolbar2TkAgg( canvas, root )
+#toolbar = backend.NavigationToolbar2TkAgg( canvas, root )
 #toolbar.update()
-canvas._tkcanvas.pack(side=Tk.TOP, fill=Tk.BOTH, expand=1)
+#toolbar.pack(side=Tk.LEFT)
 
-button = Tk.Button(master=root, text='Quit', command=sys.exit)
+def destroy():
+raise SystemExit
+
+button = Tk.Button(master=root, text='Quit', command=destroy)
 button.pack(side=Tk.BOTTOM)
 
 Tk.mainloop()

Modified: branches/v0_91_maint/examples/mathtext_demo.py
===
--- branches/v0_91_maint/examples/mathtext_demo.py  2008-05-17 17:05:36 UTC 
(rev 5170)
+++ branches/v0_91_maint/examples/mathtext_demo.py  2008-05-17 20:57:13 UTC 
(rev 5171)
@@ -18,7 +18,7 @@
 ax.set_ylabel(r'$\Delta_{i+1}^j$', fontsize=20)
 tex = r'$\mathcal{R}\prod_{i=\alpha_{i+1}}^\infty a_i\sin(2 \pi f x_i)$'
 
-ax.text(1, 1.6, tex, fontsize=20, va='bottom')
+mymath = ax.text(1, 1.6, tex, fontsize=20, va='bottom')
 
 ax.legend(("Foo", "Testing $x^2$"))
 

Modified: branches/v0_91_maint/examples/mathtext_examples.py
===
--- branches/v0_91_maint/examples/mathtext_examples.py  2008-05-17 17:05:36 UTC 
(rev 5170)
+++ branches/v0_91_maint/examples/mathtext_examples.py  2008-05-17 20:57:13 UTC 
(rev 5171)
@@ -49,7 +49,7 @@
 r'$\widehat{abc}\widetilde{def}$',
 r'$\Gamma \Delta \Theta \Lambda \Xi \Pi \Sigma \Upsilon \Phi \Psi \Omega$',
 r'$\alpha \beta \gamma \delta \epsilon \zeta \eta \theta \iota \lambda \mu 
\nu \xi \pi \kappa \rho \sigma \tau \upsilon \phi \chi \psi$',
-ur'Generic symbol: $\u23ce \mathrm{\ue0f2 \U0001D538}$'
+#ur'Generic symbol: $\u23ce \mathrm{\ue0f2 \U0001D538}$'
 ]
 
 from pylab import *

Modified: branches/v0_91_maint/lib/matplotlib/backends/backend_agg.py
==

SF.net SVN: matplotlib: [5172] branches/v0_91_maint/lib/matplotlib/cbook.py

2008-05-17 Thread jdh2358
Revision: 5172
  http://matplotlib.svn.sourceforge.net/matplotlib/?rev=5172&view=rev
Author:   jdh2358
Date: 2008-05-17 14:06:05 -0700 (Sat, 17 May 2008)

Log Message:
---
added a doc string to the branch -- just experimenting with svn merge here

Modified Paths:
--
branches/v0_91_maint/lib/matplotlib/cbook.py

Modified: branches/v0_91_maint/lib/matplotlib/cbook.py
===
--- branches/v0_91_maint/lib/matplotlib/cbook.py2008-05-17 20:57:13 UTC 
(rev 5171)
+++ branches/v0_91_maint/lib/matplotlib/cbook.py2008-05-17 21:06:05 UTC 
(rev 5172)
@@ -220,6 +220,7 @@
 return is_string_like(obj) or not iterable(obj)
 
 def is_numlike(obj):
+'return true if obj looks like a number'
 try: obj+1
 except TypeError: return False
 else: return True


This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.

-
This SF.net email is sponsored by: Microsoft 
Defy all challenges. Microsoft(R) Visual Studio 2008. 
http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/
___
Matplotlib-checkins mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/matplotlib-checkins


SF.net SVN: matplotlib: [5173] trunk/matplotlib/lib/matplotlib/backends/ backend_agg.py

2008-05-17 Thread jdh2358
Revision: 5173
  http://matplotlib.svn.sourceforge.net/matplotlib/?rev=5173&view=rev
Author:   jdh2358
Date: 2008-05-17 14:06:39 -0700 (Sat, 17 May 2008)

Log Message:
---
committing in advance of a merge

Modified Paths:
--
trunk/matplotlib/lib/matplotlib/backends/backend_agg.py

Modified: trunk/matplotlib/lib/matplotlib/backends/backend_agg.py
===
--- trunk/matplotlib/lib/matplotlib/backends/backend_agg.py 2008-05-17 
21:06:05 UTC (rev 5172)
+++ trunk/matplotlib/lib/matplotlib/backends/backend_agg.py 2008-05-17 
21:06:39 UTC (rev 5173)
@@ -290,7 +290,7 @@
 original_dpi = renderer.dpi
 renderer.dpi = self.figure.dpi
 if type(filename_or_obj) in (str, unicode):
-filename_or_obj = open(filename_or_obj, 'wb')
+filename_or_obj = opefile(filename_or_obj, 'wb')
 renderer._renderer.write_rgba(filename_or_obj)
 renderer.dpi = original_dpi
 print_rgba = print_raw
@@ -301,6 +301,6 @@
 original_dpi = renderer.dpi
 renderer.dpi = self.figure.dpi
 if type(filename_or_obj) in (str, unicode):
-filename_or_obj = open(filename_or_obj, 'wb')
+filename_or_obj = file(filename_or_obj, 'wb')
 self.get_renderer()._renderer.write_png(filename_or_obj, 
self.figure.dpi)
 renderer.dpi = original_dpi


This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.

-
This SF.net email is sponsored by: Microsoft 
Defy all challenges. Microsoft(R) Visual Studio 2008. 
http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/
___
Matplotlib-checkins mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/matplotlib-checkins


SF.net SVN: matplotlib: [5174] trunk/matplotlib/

2008-05-17 Thread jdh2358
Revision: 5174
  http://matplotlib.svn.sourceforge.net/matplotlib/?rev=5174&view=rev
Author:   jdh2358
Date: 2008-05-17 14:14:53 -0700 (Sat, 17 May 2008)

Log Message:
---
screwed up merge, trying to clean up

Property Changed:

trunk/matplotlib/


Property changes on: trunk/matplotlib
___
Name: svnmerge-integrated
   - /branches/v0_91_maint:1-5136
   + /branches/v0_91_maint:1-5173


This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.

-
This SF.net email is sponsored by: Microsoft 
Defy all challenges. Microsoft(R) Visual Studio 2008. 
http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/
___
Matplotlib-checkins mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/matplotlib-checkins


SF.net SVN: matplotlib: [5175] trunk/matplotlib/

2008-05-17 Thread jdh2358
Revision: 5175
  http://matplotlib.svn.sourceforge.net/matplotlib/?rev=5175&view=rev
Author:   jdh2358
Date: 2008-05-17 14:18:53 -0700 (Sat, 17 May 2008)

Log Message:
---
trying to reinit merge

Property Changed:

trunk/matplotlib/


Property changes on: trunk/matplotlib
___
Name: svnmerge-integrated
   - /branches/v0_91_maint:1-5173


This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.

-
This SF.net email is sponsored by: Microsoft 
Defy all challenges. Microsoft(R) Visual Studio 2008. 
http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/
___
Matplotlib-checkins mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/matplotlib-checkins


SF.net SVN: matplotlib: [5176] trunk/matplotlib/

2008-05-17 Thread jdh2358
Revision: 5176
  http://matplotlib.svn.sourceforge.net/matplotlib/?rev=5176&view=rev
Author:   jdh2358
Date: 2008-05-17 14:19:10 -0700 (Sat, 17 May 2008)

Log Message:
---
trying to reinit merge

Property Changed:

trunk/matplotlib/


Property changes on: trunk/matplotlib
___
Name: svnmerge-integrated
   + /branches/v0_91_maint:1-4816


This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.

-
This SF.net email is sponsored by: Microsoft 
Defy all challenges. Microsoft(R) Visual Studio 2008. 
http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/
___
Matplotlib-checkins mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/matplotlib-checkins


SF.net SVN: matplotlib: [5177] trunk/matplotlib

2008-05-17 Thread jdh2358
Revision: 5177
  http://matplotlib.svn.sourceforge.net/matplotlib/?rev=5177&view=rev
Author:   jdh2358
Date: 2008-05-17 14:20:15 -0700 (Sat, 17 May 2008)

Log Message:
---
Merged revisions 5172 via svnmerge from 
https://matplotlib.svn.sourceforge.net/svnroot/matplotlib/branches/v0_91_maint


  r5172 | jdh2358 | 2008-05-17 16:06:05 -0500 (Sat, 17 May 2008) | 1 line
  
  added a doc string to the branch -- just experimenting with svn merge here


Modified Paths:
--
trunk/matplotlib/lib/matplotlib/cbook.py

Property Changed:

trunk/matplotlib/


Property changes on: trunk/matplotlib
___
Name: svnmerge-integrated
   - /branches/v0_91_maint:1-4816
   + /branches/v0_91_maint:1-4816,5172

Modified: trunk/matplotlib/lib/matplotlib/cbook.py
===
--- trunk/matplotlib/lib/matplotlib/cbook.py2008-05-17 21:19:10 UTC (rev 
5176)
+++ trunk/matplotlib/lib/matplotlib/cbook.py2008-05-17 21:20:15 UTC (rev 
5177)
@@ -216,6 +216,7 @@
 return is_string_like(obj) or not iterable(obj)
 
 def is_numlike(obj):
+'return true if obj looks like a number'
 try: obj+1
 except TypeError: return False
 else: return True


This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.

-
This SF.net email is sponsored by: Microsoft 
Defy all challenges. Microsoft(R) Visual Studio 2008. 
http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/
___
Matplotlib-checkins mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/matplotlib-checkins


SF.net SVN: matplotlib: [5178] branches/v0_91_maint/CODING_GUIDE

2008-05-17 Thread jdh2358
Revision: 5178
  http://matplotlib.svn.sourceforge.net/matplotlib/?rev=5178&view=rev
Author:   jdh2358
Date: 2008-05-17 14:28:34 -0700 (Sat, 17 May 2008)

Log Message:
---
updated the coding guide to encourage svnmerge

Modified Paths:
--
branches/v0_91_maint/CODING_GUIDE

Modified: branches/v0_91_maint/CODING_GUIDE
===
--- branches/v0_91_maint/CODING_GUIDE   2008-05-17 21:20:15 UTC (rev 5177)
+++ branches/v0_91_maint/CODING_GUIDE   2008-05-17 21:28:34 UTC (rev 5178)
@@ -12,7 +12,7 @@
 # checking out the main src
 svn co 
https://matplotlib.svn.sourceforge.net/svnroot/matplotlib/trunk/matplotlib 
matplotlib --username=youruser --password=yourpass
 
-# branch checkouts, eg the transforms branch 
+# branch checkouts, eg the transforms branch
 svn co 
https://matplotlib.svn.sourceforge.net/svnroot/matplotlib/branches/transforms 
transbranch
 
 == Committing changes ==
@@ -41,14 +41,33 @@
 MANIFEST.in.  This file determines what goes into the src
 distribution of the mpl build.
 
+  * Keep the maintenance branch and trunk in sync here it makes sense.
+If there is a bug on both that needs fixing, use svnmerge.py to
+fix them.  http://www.orcaware.com/svn/wiki/Svnmerge.py.  The
+basic procedure is:
+
+  - get a svn copy of the branch (svn co
+
https://matplotlib.svn.sourceforge.net/svnroot/matplotlib/branches/v0_91_maint)
+and the trunk (svn co
+
https://matplotlib.svn.sourceforge.net/svnroot/matplotlib/trunk/matplotlib)
+
+  - Michael advises making the change on the branch and committing
+it.  Make sure you svn upped on the trunk and have no local
+modifications, and then from the svn trunk do
+
+   # where these are the revision numbers.  ranges also acceptable
+> svnmerge.py merge -rNNN1,NNN2
+   # this file is automatically created by the merge command
+> svn commit -F svnmerge-commit-message.txt
+
 == Importing and name spaces ==
 
 For numpy, use:
 
 import numpy as npy
 a = npy.array([1,2,3])
-
 
+
 For masked arrays, use:
 import matplotlib.numerix.npyma as ma
 
@@ -64,8 +83,8 @@
 
 For matplotlib modules (or any other modules), use:
 
-import matplotlib.cbook as cbook 
-
+import matplotlib.cbook as cbook
+
 if cbook.iterable(z):
 pass
 
@@ -125,7 +144,7 @@
 
 (add-hook 'python-mode-hook
   (lambda ()
-  (add-hook 'local-write-file-hooks 'delete-trailing-whitespace))) 
+  (add-hook 'local-write-file-hooks 'delete-trailing-whitespace)))
 
 
 


This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.

-
This SF.net email is sponsored by: Microsoft 
Defy all challenges. Microsoft(R) Visual Studio 2008. 
http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/
___
Matplotlib-checkins mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/matplotlib-checkins


SF.net SVN: matplotlib: [5179] branches/v0_91_maint/lib/matplotlib/cbook.py

2008-05-17 Thread jdh2358
Revision: 5179
  http://matplotlib.svn.sourceforge.net/matplotlib/?rev=5179&view=rev
Author:   jdh2358
Date: 2008-05-17 14:30:23 -0700 (Sat, 17 May 2008)

Log Message:
---
a few more doc string fixes in cboo

Modified Paths:
--
branches/v0_91_maint/lib/matplotlib/cbook.py

Modified: branches/v0_91_maint/lib/matplotlib/cbook.py
===
--- branches/v0_91_maint/lib/matplotlib/cbook.py2008-05-17 21:28:34 UTC 
(rev 5178)
+++ branches/v0_91_maint/lib/matplotlib/cbook.py2008-05-17 21:30:23 UTC 
(rev 5179)
@@ -202,21 +202,25 @@
return dict([ (val, 1) for val in x]).keys()
 
 def iterable(obj):
+'return true if obj is iterable'
 try: len(obj)
 except: return 0
 return 1
 
 
 def is_string_like(obj):
+'return true if obj looks like a string'
 if hasattr(obj, 'shape'): return 0
 try: obj + ''
 except (TypeError, ValueError): return 0
 return 1
 
 def is_writable_file_like(obj):
+'return true if obj looks like a file object'
 return hasattr(obj, 'write') and callable(obj.write)
 
 def is_scalar(obj):
+'return true if ob is not string like and is not iterable'
 return is_string_like(obj) or not iterable(obj)
 
 def is_numlike(obj):


This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.

-
This SF.net email is sponsored by: Microsoft 
Defy all challenges. Microsoft(R) Visual Studio 2008. 
http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/
___
Matplotlib-checkins mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/matplotlib-checkins


SF.net SVN: matplotlib: [5180] trunk/matplotlib

2008-05-17 Thread jdh2358
Revision: 5180
  http://matplotlib.svn.sourceforge.net/matplotlib/?rev=5180&view=rev
Author:   jdh2358
Date: 2008-05-17 14:32:33 -0700 (Sat, 17 May 2008)

Log Message:
---
Merged revisions 5178-5179 via svnmerge from 
https://matplotlib.svn.sourceforge.net/svnroot/matplotlib/branches/v0_91_maint


  r5178 | jdh2358 | 2008-05-17 16:28:34 -0500 (Sat, 17 May 2008) | 1 line
  
  updated the coding guide to encourage svnmerge

  r5179 | jdh2358 | 2008-05-17 16:30:23 -0500 (Sat, 17 May 2008) | 1 line
  
  a few more doc string fixes in cboo


Modified Paths:
--
trunk/matplotlib/CODING_GUIDE
trunk/matplotlib/lib/matplotlib/cbook.py

Property Changed:

trunk/matplotlib/


Property changes on: trunk/matplotlib
___
Name: svnmerge-integrated
   - /branches/v0_91_maint:1-4816,5172
   + /branches/v0_91_maint:1-4816,5172,5178-5179

Modified: trunk/matplotlib/CODING_GUIDE
===
--- trunk/matplotlib/CODING_GUIDE   2008-05-17 21:30:23 UTC (rev 5179)
+++ trunk/matplotlib/CODING_GUIDE   2008-05-17 21:32:33 UTC (rev 5180)
@@ -41,10 +41,30 @@
 MANIFEST.in.  This file determines what goes into the src
 distribution of the mpl build.
 
+  * Keep the maintenance branch and trunk in sync here it makes sense.
+If there is a bug on both that needs fixing, use svnmerge.py to
+fix them.  http://www.orcaware.com/svn/wiki/Svnmerge.py.  The
+basic procedure is:
+
+  - get a svn copy of the branch (svn co
+
https://matplotlib.svn.sourceforge.net/svnroot/matplotlib/branches/v0_91_maint)
+and the trunk (svn co
+
https://matplotlib.svn.sourceforge.net/svnroot/matplotlib/trunk/matplotlib)
+
+  - Michael advises making the change on the branch and committing
+it.  Make sure you svn upped on the trunk and have no local
+modifications, and then from the svn trunk do
+
+   # where these are the revision numbers.  ranges also acceptable
+> svnmerge.py merge -rNNN1,NNN2
+   # this file is automatically created by the merge command
+> svn commit -F svnmerge-commit-message.txt
+
 == Importing and name spaces ==
 
 For numpy, use:
 
+
 import numpy as np
 a = np.array([1,2,3])
 

Modified: trunk/matplotlib/lib/matplotlib/cbook.py
===
--- trunk/matplotlib/lib/matplotlib/cbook.py2008-05-17 21:30:23 UTC (rev 
5179)
+++ trunk/matplotlib/lib/matplotlib/cbook.py2008-05-17 21:32:33 UTC (rev 
5180)
@@ -198,21 +198,25 @@
 return dict([ (val, 1) for val in x]).keys()
 
 def iterable(obj):
+'return true if obj is iterable'
 try: len(obj)
 except: return 0
 return 1
 
 
 def is_string_like(obj):
+'return true if obj looks like a string'
 if hasattr(obj, 'shape'): return 0
 try: obj + ''
 except (TypeError, ValueError): return 0
 return 1
 
 def is_writable_file_like(obj):
+'return true if obj looks like a file object'
 return hasattr(obj, 'write') and callable(obj.write)
 
 def is_scalar(obj):
+'return true if ob is not string like and is not iterable'
 return is_string_like(obj) or not iterable(obj)
 
 def is_numlike(obj):


This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.

-
This SF.net email is sponsored by: Microsoft 
Defy all challenges. Microsoft(R) Visual Studio 2008. 
http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/
___
Matplotlib-checkins mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/matplotlib-checkins


SF.net SVN: matplotlib: [5181] branches/v0_91_maint/CODING_GUIDE

2008-05-17 Thread jdh2358
Revision: 5181
  http://matplotlib.svn.sourceforge.net/matplotlib/?rev=5181&view=rev
Author:   jdh2358
Date: 2008-05-17 14:38:21 -0700 (Sat, 17 May 2008)

Log Message:
---
fixed some typos in the CODING_GUIDE

Modified Paths:
--
branches/v0_91_maint/CODING_GUIDE

Modified: branches/v0_91_maint/CODING_GUIDE
===
--- branches/v0_91_maint/CODING_GUIDE   2008-05-17 21:32:33 UTC (rev 5180)
+++ branches/v0_91_maint/CODING_GUIDE   2008-05-17 21:38:21 UTC (rev 5181)
@@ -41,11 +41,13 @@
 MANIFEST.in.  This file determines what goes into the src
 distribution of the mpl build.
 
-  * Keep the maintenance branch and trunk in sync here it makes sense.
+  * Keep the maintenance branch and trunk in sync where it makes sense.
 If there is a bug on both that needs fixing, use svnmerge.py to
-fix them.  http://www.orcaware.com/svn/wiki/Svnmerge.py.  The
+keep them in sync.  http://www.orcaware.com/svn/wiki/Svnmerge.py.  The
 basic procedure is:
 
+  - install svnmerge.py in your PATH
+
   - get a svn copy of the branch (svn co
 
https://matplotlib.svn.sourceforge.net/svnroot/matplotlib/branches/v0_91_maint)
 and the trunk (svn co
@@ -55,8 +57,9 @@
 it.  Make sure you svn upped on the trunk and have no local
 modifications, and then from the svn trunk do
 
-   # where these are the revision numbers.  ranges also acceptable
+   # where the NNN are the revision numbers.  ranges also acceptable
 > svnmerge.py merge -rNNN1,NNN2
+
# this file is automatically created by the merge command
 > svn commit -F svnmerge-commit-message.txt
 


This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.

-
This SF.net email is sponsored by: Microsoft 
Defy all challenges. Microsoft(R) Visual Studio 2008. 
http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/
___
Matplotlib-checkins mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/matplotlib-checkins


SF.net SVN: matplotlib: [5182] trunk/matplotlib

2008-05-17 Thread jdh2358
Revision: 5182
  http://matplotlib.svn.sourceforge.net/matplotlib/?rev=5182&view=rev
Author:   jdh2358
Date: 2008-05-17 14:39:46 -0700 (Sat, 17 May 2008)

Log Message:
---
Merged revisions 5181 via svnmerge from 
https://matplotlib.svn.sourceforge.net/svnroot/matplotlib/branches/v0_91_maint


  r5181 | jdh2358 | 2008-05-17 16:38:21 -0500 (Sat, 17 May 2008) | 1 line
  
  fixed some typos in the CODING_GUIDE


Modified Paths:
--
trunk/matplotlib/CODING_GUIDE

Property Changed:

trunk/matplotlib/


Property changes on: trunk/matplotlib
___
Name: svnmerge-integrated
   - /branches/v0_91_maint:1-4816,5172,5178-5179
   + /branches/v0_91_maint:1-4816,5172,5178-5179,5181

Modified: trunk/matplotlib/CODING_GUIDE
===
--- trunk/matplotlib/CODING_GUIDE   2008-05-17 21:38:21 UTC (rev 5181)
+++ trunk/matplotlib/CODING_GUIDE   2008-05-17 21:39:46 UTC (rev 5182)
@@ -41,11 +41,13 @@
 MANIFEST.in.  This file determines what goes into the src
 distribution of the mpl build.
 
-  * Keep the maintenance branch and trunk in sync here it makes sense.
+  * Keep the maintenance branch and trunk in sync where it makes sense.
 If there is a bug on both that needs fixing, use svnmerge.py to
-fix them.  http://www.orcaware.com/svn/wiki/Svnmerge.py.  The
+keep them in sync.  http://www.orcaware.com/svn/wiki/Svnmerge.py.  The
 basic procedure is:
 
+  - install svnmerge.py in your PATH
+
   - get a svn copy of the branch (svn co
 
https://matplotlib.svn.sourceforge.net/svnroot/matplotlib/branches/v0_91_maint)
 and the trunk (svn co
@@ -55,8 +57,9 @@
 it.  Make sure you svn upped on the trunk and have no local
 modifications, and then from the svn trunk do
 
-   # where these are the revision numbers.  ranges also acceptable
+   # where the NNN are the revision numbers.  ranges also acceptable
 > svnmerge.py merge -rNNN1,NNN2
+
# this file is automatically created by the merge command
 > svn commit -F svnmerge-commit-message.txt
 


This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.

-
This SF.net email is sponsored by: Microsoft 
Defy all challenges. Microsoft(R) Visual Studio 2008. 
http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/
___
Matplotlib-checkins mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/matplotlib-checkins


SF.net SVN: matplotlib: [5183] trunk/matplotlib/examples/tests/ backend_driver.py

2008-05-17 Thread jdh2358
Revision: 5183
  http://matplotlib.svn.sourceforge.net/matplotlib/?rev=5183&view=rev
Author:   jdh2358
Date: 2008-05-17 14:47:40 -0700 (Sat, 17 May 2008)

Log Message:
---
fixed backend driver cleanup

Modified Paths:
--
trunk/matplotlib/examples/tests/backend_driver.py

Modified: trunk/matplotlib/examples/tests/backend_driver.py
===
--- trunk/matplotlib/examples/tests/backend_driver.py   2008-05-17 21:39:46 UTC 
(rev 5182)
+++ trunk/matplotlib/examples/tests/backend_driver.py   2008-05-17 21:47:40 UTC 
(rev 5183)
@@ -205,9 +205,10 @@
 if len(sys.argv)==2 and sys.argv[1]=='--clean':
 for b in default_backends:
 # todo: implement python recursive remove
-os.system('rm -rf %s'%b)
-print 'all clean...'
-raise SystemExit
+print 'executing: %s'%command
+os.system(command)
+print 'all clean...'
+raise SystemExit
 if '--coverage' in sys.argv:
 python = ['coverage.py', '-x']
 sys.argv.remove('--coverage')


This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.

-
This SF.net email is sponsored by: Microsoft 
Defy all challenges. Microsoft(R) Visual Studio 2008. 
http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/
___
Matplotlib-checkins mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/matplotlib-checkins


SF.net SVN: matplotlib: [5184] trunk/matplotlib/examples/tests/ backend_driver.py

2008-05-17 Thread jdh2358
Revision: 5184
  http://matplotlib.svn.sourceforge.net/matplotlib/?rev=5184&view=rev
Author:   jdh2358
Date: 2008-05-17 14:54:14 -0700 (Sat, 17 May 2008)

Log Message:
---
fixed backend driver cleanup

Modified Paths:
--
trunk/matplotlib/examples/tests/backend_driver.py

Modified: trunk/matplotlib/examples/tests/backend_driver.py
===
--- trunk/matplotlib/examples/tests/backend_driver.py   2008-05-17 21:47:40 UTC 
(rev 5183)
+++ trunk/matplotlib/examples/tests/backend_driver.py   2008-05-17 21:54:14 UTC 
(rev 5184)
@@ -16,7 +16,7 @@
 """
 
 from __future__ import division
-import os, time, sys
+import os, time, sys, glob
 import matplotlib.backends as mplbe
 
 pylab_dir = os.path.join('..', 'pylab')
@@ -203,10 +203,15 @@
 times = {}
 default_backends = ['Agg', 'PS', 'SVG', 'PDF', 'Template']
 if len(sys.argv)==2 and sys.argv[1]=='--clean':
-for b in default_backends:
-# todo: implement python recursive remove
-print 'executing: %s'%command
-os.system(command)
+localdirs = [d for d in glob.glob('*') if os.path.isdir(d)]
+backends_lower = set([b.lower() for b in default_backends])
+for d in localdirs:
+if d.lower() in backends_lower:
+command = 'rm -rf %s'%d
+# todo: implement python recursive remove
+print 'executing: %s'%command
+os.system(command)
+os.system('rm -rf _tmp*.py')
 print 'all clean...'
 raise SystemExit
 if '--coverage' in sys.argv:


This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.

-
This SF.net email is sponsored by: Microsoft 
Defy all challenges. Microsoft(R) Visual Studio 2008. 
http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/
___
Matplotlib-checkins mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/matplotlib-checkins


SF.net SVN: matplotlib: [5185] trunk/matplotlib/examples/tests/ backend_driver.py

2008-05-17 Thread jdh2358
Revision: 5185
  http://matplotlib.svn.sourceforge.net/matplotlib/?rev=5185&view=rev
Author:   jdh2358
Date: 2008-05-17 14:57:19 -0700 (Sat, 17 May 2008)

Log Message:
---
fixed backend driver cleanup

Modified Paths:
--
trunk/matplotlib/examples/tests/backend_driver.py

Modified: trunk/matplotlib/examples/tests/backend_driver.py
===
--- trunk/matplotlib/examples/tests/backend_driver.py   2008-05-17 21:54:14 UTC 
(rev 5184)
+++ trunk/matplotlib/examples/tests/backend_driver.py   2008-05-17 21:57:19 UTC 
(rev 5185)
@@ -19,6 +19,9 @@
 import os, time, sys, glob
 import matplotlib.backends as mplbe
 
+all_backends = [b.lower() for b in mplbe.all_backends]
+all_backends.extend(['cairo.png', 'cairo.ps', 'cairo.pdf', 'cairo.svg'])
+
 pylab_dir = os.path.join('..', 'pylab')
 pylab_files = [
 'alignment_test.py',
@@ -204,9 +207,9 @@
 default_backends = ['Agg', 'PS', 'SVG', 'PDF', 'Template']
 if len(sys.argv)==2 and sys.argv[1]=='--clean':
 localdirs = [d for d in glob.glob('*') if os.path.isdir(d)]
-backends_lower = set([b.lower() for b in default_backends])
+all_backends_set = set(all_backends)
 for d in localdirs:
-if d.lower() in backends_lower:
+if d.lower() in all_backends_set:
 command = 'rm -rf %s'%d
 # todo: implement python recursive remove
 print 'executing: %s'%command
@@ -225,8 +228,6 @@
 python = [r'c:\Python24\python.exe']
 else:
 python = ['python']
-all_backends = [b.lower() for b in mplbe.all_backends]
-all_backends.extend(['cairo.png', 'cairo.ps', 'cairo.pdf', 'cairo.svg'])
 backends = []
 switches = []
 if sys.argv[1:]:


This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.

-
This SF.net email is sponsored by: Microsoft 
Defy all challenges. Microsoft(R) Visual Studio 2008. 
http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/
___
Matplotlib-checkins mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/matplotlib-checkins


SF.net SVN: matplotlib: [5186] trunk/matplotlib/examples/tests/ backend_driver.py

2008-05-17 Thread jdh2358
Revision: 5186
  http://matplotlib.svn.sourceforge.net/matplotlib/?rev=5186&view=rev
Author:   jdh2358
Date: 2008-05-17 15:05:52 -0700 (Sat, 17 May 2008)

Log Message:
---
fixed backend driver cleanup

Modified Paths:
--
trunk/matplotlib/examples/tests/backend_driver.py

Modified: trunk/matplotlib/examples/tests/backend_driver.py
===
--- trunk/matplotlib/examples/tests/backend_driver.py   2008-05-17 21:57:19 UTC 
(rev 5185)
+++ trunk/matplotlib/examples/tests/backend_driver.py   2008-05-17 22:05:52 UTC 
(rev 5186)
@@ -209,12 +209,14 @@
 localdirs = [d for d in glob.glob('*') if os.path.isdir(d)]
 all_backends_set = set(all_backends)
 for d in localdirs:
-if d.lower() in all_backends_set:
-command = 'rm -rf %s'%d
-# todo: implement python recursive remove
-print 'executing: %s'%command
-os.system(command)
-os.system('rm -rf _tmp*.py')
+if d.lower() not in all_backends_set: continue
+print 'removing %s'%d
+for fname in glob.glob(os.path.join(d, '*')):
+os.remove(fname)
+os.rmdir(d)
+for fname in glob.glob('_tmp*.py'):
+os.remove(fname)
+
 print 'all clean...'
 raise SystemExit
 if '--coverage' in sys.argv:


This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.

-
This SF.net email is sponsored by: Microsoft 
Defy all challenges. Microsoft(R) Visual Studio 2008. 
http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/
___
Matplotlib-checkins mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/matplotlib-checkins