SF.net SVN: matplotlib: [4958] trunk/matplotlib/lib/matplotlib

2008-02-13 Thread efiring
Revision: 4958
  http://matplotlib.svn.sourceforge.net/matplotlib/?rev=4958&view=rev
Author:   efiring
Date: 2008-02-13 00:34:53 -0800 (Wed, 13 Feb 2008)

Log Message:
---
Fixed bugs in pcolorfast and in quadmesh rendering with svg, pdf

Modified Paths:
--
trunk/matplotlib/lib/matplotlib/axes.py
trunk/matplotlib/lib/matplotlib/backends/backend_mixed.py
trunk/matplotlib/lib/matplotlib/image.py

Modified: trunk/matplotlib/lib/matplotlib/axes.py
===
--- trunk/matplotlib/lib/matplotlib/axes.py 2008-02-13 02:31:45 UTC (rev 
4957)
+++ trunk/matplotlib/lib/matplotlib/axes.py 2008-02-13 08:34:53 UTC (rev 
4958)
@@ -5035,7 +5035,8 @@
 if (npy.ptp(dx) < 0.01*npy.abs(dx.mean()) and
 npy.ptp(dy) < 0.01*npy.abs(dy.mean())):
 style = "image"
-style = "pcolorimage"
+else:
+style = "pcolorimage"
 elif x.ndim == 2 and y.ndim == 2:
 style = "quadmesh"
 else:

Modified: trunk/matplotlib/lib/matplotlib/backends/backend_mixed.py
===
--- trunk/matplotlib/lib/matplotlib/backends/backend_mixed.py   2008-02-13 
02:31:45 UTC (rev 4957)
+++ trunk/matplotlib/lib/matplotlib/backends/backend_mixed.py   2008-02-13 
08:34:53 UTC (rev 4958)
@@ -89,7 +89,7 @@
 if w > 0 and h > 0:
 image = frombuffer(buffer, w, h, True)
 image.is_grayscale = False
-
+image.flipud_out()
 self._renderer.draw_image(l, height - b - h, image, None)
 self._raster_renderer = None
 self._rasterizing = False

Modified: trunk/matplotlib/lib/matplotlib/image.py
===
--- trunk/matplotlib/lib/matplotlib/image.py2008-02-13 02:31:45 UTC (rev 
4957)
+++ trunk/matplotlib/lib/matplotlib/image.py2008-02-13 08:34:53 UTC (rev 
4958)
@@ -451,8 +451,8 @@
 A = self._rgbacache
 vl = self.axes.viewLim
 im = _image.pcolor2(self._Ax, self._Ay, A,
-   self.axes.bbox.height,
-   self.axes.bbox.width,
+   height,
+   width,
(vl.x0, vl.x1, vl.y0, vl.y1),
bg)
 im.is_grayscale = self.is_grayscale


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: [4959] trunk/matplotlib

2008-02-13 Thread jdh2358
Revision: 4959
  http://matplotlib.svn.sourceforge.net/matplotlib/?rev=4959&view=rev
Author:   jdh2358
Date: 2008-02-13 05:50:29 -0800 (Wed, 13 Feb 2008)

Log Message:
---
Applied Erik's right-click backend_bases fix

Modified Paths:
--
trunk/matplotlib/examples/ginput_demo.py
trunk/matplotlib/examples/lasso_demo.py
trunk/matplotlib/lib/matplotlib/backend_bases.py
trunk/matplotlib/lib/matplotlib/mlab.py

Modified: trunk/matplotlib/examples/ginput_demo.py
===
--- trunk/matplotlib/examples/ginput_demo.py2008-02-13 08:34:53 UTC (rev 
4958)
+++ trunk/matplotlib/examples/ginput_demo.py2008-02-13 13:50:29 UTC (rev 
4959)
@@ -2,5 +2,5 @@
 t = arange(10)
 plot(t, sin(t))
 print "Please click"
-ginput(3, verbose=True)
+x = ginput(3, verbose=True)
 show()

Modified: trunk/matplotlib/examples/lasso_demo.py
===
--- trunk/matplotlib/examples/lasso_demo.py 2008-02-13 08:34:53 UTC (rev 
4958)
+++ trunk/matplotlib/examples/lasso_demo.py 2008-02-13 13:50:29 UTC (rev 
4959)
@@ -37,7 +37,7 @@
 
 facecolors = [d.color for d in data]
 self.xys = [(d.x, d.y) for d in data]
-
+fig = ax.figure
 self.collection = RegularPolyCollection(
 fig.dpi, 6, sizes=(100,),
 facecolors=facecolors,
@@ -47,6 +47,7 @@
 ax.add_collection(self.collection)
 
 self.cid = self.canvas.mpl_connect('button_press_event', self.onpress)
+self.ind = None
 
 def callback(self, verts):
 facecolors = self.collection.get_facecolors()
@@ -60,7 +61,7 @@
 self.canvas.draw_idle()
 self.canvas.widgetlock.release(self.lasso)
 del self.lasso
-
+self.ind = ind
 def onpress(self, event):
 if self.canvas.widgetlock.locked(): return
 if event.inaxes is None: return
@@ -68,10 +69,12 @@
 # acquire a lock on the widget drawing
 self.canvas.widgetlock(self.lasso)
 
-data = [Datum(*xy) for xy in rand(100, 2)]
+if 0:
 
-fig = figure()
-ax = fig.add_subplot(111, xlim=(0,1), ylim=(0,1), autoscale_on=False)
-lman = LassoManager(ax, data)
+data = [Datum(*xy) for xy in rand(100, 2)]
 
-show()
+fig = figure()
+ax = fig.add_subplot(111, xlim=(0,1), ylim=(0,1), autoscale_on=False)
+lman = LassoManager(ax, data)
+
+show()

Modified: trunk/matplotlib/lib/matplotlib/backend_bases.py
===
--- trunk/matplotlib/lib/matplotlib/backend_bases.py2008-02-13 08:34:53 UTC 
(rev 4958)
+++ trunk/matplotlib/lib/matplotlib/backend_bases.py2008-02-13 13:50:29 UTC 
(rev 4959)
@@ -1556,11 +1556,11 @@
 if a.get_xscale()=='log':
 alpha=npy.log(Xmax/Xmin)/npy.log(x1/x0)
 rx1=pow(Xmin/x0,alpha)*Xmin
-x2=pow(Xmax/x0,alpha)*Xmin
+rx2=pow(Xmax/x0,alpha)*Xmin
 else:
 alpha=(Xmax-Xmin)/(x1-x0)
 rx1=alpha*(Xmin-x0)+Xmin
-x2=alpha*(Xmax-x0)+Xmin
+rx2=alpha*(Xmax-x0)+Xmin
 if a.get_yscale()=='log':
 alpha=npy.log(Ymax/Ymin)/npy.log(y1/y0)
 ry1=pow(Ymin/y0,alpha)*Ymin

Modified: trunk/matplotlib/lib/matplotlib/mlab.py
===
--- trunk/matplotlib/lib/matplotlib/mlab.py 2008-02-13 08:34:53 UTC (rev 
4958)
+++ trunk/matplotlib/lib/matplotlib/mlab.py 2008-02-13 13:50:29 UTC (rev 
4959)
@@ -1943,7 +1943,13 @@
 except NotImplementedError: return False
 else: return b
 
+def safe_isinf(x):
+'isnan for arbitrary types'
+try: b = npy.isinf(x)
+except NotImplementedError: return False
+else: return b
 
+
 def rec_append_field(rec, name, arr, dtype=None):
 'return a new record array with field name populated with data from array 
arr'
 arr = npy.asarray(arr)


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: [4961] trunk/toolkits/basemap/lib/mpl_toolkits/ basemap/basemap.py

2008-02-13 Thread jswhit
Revision: 4961
  http://matplotlib.svn.sourceforge.net/matplotlib/?rev=4961&view=rev
Author:   jswhit
Date: 2008-02-13 13:24:21 -0800 (Wed, 13 Feb 2008)

Log Message:
---
added no_rot parameter (only relevant for omerc projection)

Modified Paths:
--
trunk/toolkits/basemap/lib/mpl_toolkits/basemap/basemap.py

Modified: trunk/toolkits/basemap/lib/mpl_toolkits/basemap/basemap.py
===
--- trunk/toolkits/basemap/lib/mpl_toolkits/basemap/basemap.py  2008-02-13 
17:15:11 UTC (rev 4960)
+++ trunk/toolkits/basemap/lib/mpl_toolkits/basemap/basemap.py  2008-02-13 
21:24:21 UTC (rev 4961)
@@ -79,7 +79,7 @@
 projection_params = {'cyl'  : 'corners only (no width/height)',
  'merc' : 'corners plus lat_ts (no width/height)',
  'tmerc': 'lon_0,lat_0',
- 'omerc': 'lat_0,lat_1,lat_2,lon_1,lon_2',
+ 'omerc': 'lon_0,lat_0,lat_1,lat_2,lon_1,lon_2,no_rot',
  'mill' : 'corners only (no width/height)',
  'lcc'  : 'lon_0,lat_0,lat_1,lat_2',
  'laea' : 'lon_0,lat_0',
@@ -215,6 +215,9 @@
   for oblique mercator.
  lon_2 - longitude of one of the two points on the projection centerline
   for oblique mercator.
+ no_rot - only used by oblique mercator.  If set to True, the map projection
+  coordinates will not be rotated to true North.  Default is False (projection
+  coordinates are automatically rotated).
  lat_0 - central latitude (y-axis origin) - used by all projections,
   Must be equator for mercator projection.
  lon_0 - central meridian (x-axis origin) - used by all projections,
@@ -336,6 +339,7 @@
lat_1=None, lat_2=None,
lat_0=None, lon_0=None,
lon_1=None, lon_2=None,
+   no_rot=False,
suppress_ticks=True,
satellite_height=35786000,
boundinglat=None,
@@ -527,13 +531,15 @@
 self.llcrnrlon = llcrnrlon; self.llcrnrlat = llcrnrlat
 self.urcrnrlon = urcrnrlon; self.urcrnrlat = urcrnrlat
 elif projection == 'omerc':
-if lat_1 is None or lon_1 is None or lat_2 is None or lon_2 is 
None or lat_0 is None:
-raise ValueError, 'must specify lat_0 and lat_1,lon_1 and 
lat_2,lon_2 for Oblique Mercator basemap'
+if lat_1 is None or lon_1 is None or lat_2 is None or lon_2 is 
None:
+raise ValueError, 'must specify lat_1,lon_1 and lat_2,lon_2 
for Oblique Mercator basemap'
 projparams['lat_1'] = lat_1
 projparams['lon_1'] = lon_1
 projparams['lat_2'] = lat_2
 projparams['lon_2'] = lon_2
 projparams['lat_0'] = lat_0
+if no_rot:
+projparams['no_rot']=''
 #if not using_corners:
 #raise ValueError, 'cannot specify map region with width and 
height keywords for this projection, please specify lat/lon values of corners'
 if not using_corners:


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: [4962] trunk/toolkits/basemap/Changelog

2008-02-13 Thread jswhit
Revision: 4962
  http://matplotlib.svn.sourceforge.net/matplotlib/?rev=4962&view=rev
Author:   jswhit
Date: 2008-02-13 13:48:38 -0800 (Wed, 13 Feb 2008)

Log Message:
---
added no_rot keyword

Modified Paths:
--
trunk/toolkits/basemap/Changelog

Modified: trunk/toolkits/basemap/Changelog
===
--- trunk/toolkits/basemap/Changelog2008-02-13 21:24:21 UTC (rev 4961)
+++ trunk/toolkits/basemap/Changelog2008-02-13 21:48:38 UTC (rev 4962)
@@ -8,7 +8,8 @@
  support re-enabled.
* changed _geos to _geoslib, so as not to conflict with
  the python module bundled with the GEOS library.
-   * some fixes/enhancements for omerc projection.
+   * some fixes/enhancements for omerc projection (added 'no_rot'
+ flag).
 version 0.9.9.1 (svn revision 4808)
* require python 2.4 (really only needed for building).
  Once namespace packages are re-enabled in matplotlib,


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