SF.net SVN: matplotlib:[7987] trunk/matplotlib/test

2009-11-30 Thread astraw
Revision: 7987
  http://matplotlib.svn.sourceforge.net/matplotlib/?rev=7987view=rev
Author:   astraw
Date: 2009-11-30 09:06:48 + (Mon, 30 Nov 2009)

Log Message:
---
buildbot test running: run tests in MPL root dir (bypasses weird bug with scons 
build)

Modified Paths:
--
trunk/matplotlib/test/_buildbot_test.py
trunk/matplotlib/test/_buildbot_test_postmortem.py

Modified: trunk/matplotlib/test/_buildbot_test.py
===
--- trunk/matplotlib/test/_buildbot_test.py 2009-11-26 19:37:06 UTC (rev 
7986)
+++ trunk/matplotlib/test/_buildbot_test.py 2009-11-30 09:06:48 UTC (rev 
7987)
@@ -1,7 +1,6 @@
 This script will install matplotlib to a virtual environment to
 faciltate testing.
-import shutil, os, sys, glob
-from subprocess import Popen, PIPE, STDOUT
+import os, glob
 
 from _buildbot_util import check_call
 
@@ -13,10 +12,8 @@
 TARGET_py = os.path.join(TARGET,'bin','python')
 check_call('%s -c import shutil,matplotlib; x=matplotlib.get_configdir(); 
shutil.rmtree(x)'%TARGET_py)
 
-
-previous_test_images = glob.glob(os.path.join('test','failed-diff-*.png'))
+previous_test_images = glob.glob('failed-diff-*.png')
 for fname in previous_test_images:
 os.unlink(fname)
 
-check_call('%s -c import sys, matplotlib; success = 
matplotlib.test(verbosity=2); sys.exit(not success)'%TARGET_py,
-   cwd='test')
+check_call('%s -c import sys, matplotlib; success = 
matplotlib.test(verbosity=2); sys.exit(not success)'%TARGET_py)

Modified: trunk/matplotlib/test/_buildbot_test_postmortem.py
===
--- trunk/matplotlib/test/_buildbot_test_postmortem.py  2009-11-26 19:37:06 UTC 
(rev 7986)
+++ trunk/matplotlib/test/_buildbot_test_postmortem.py  2009-11-30 09:06:48 UTC 
(rev 7987)
@@ -4,7 +4,7 @@
 
 This is meant to be run from the mplroot directory.
 
-import os, sys, glob, shutil
+import os, shutil
 
 roots = ['test_matplotlib','test_plots']
 savedresults_dir = 'saved-results'
@@ -80,7 +80,6 @@
 
 # new matplotlib.testing infrastructure
 
-os.chdir('test')
 for fname in get_recursive_filelist(['result_images']):
 # only images
 if not fname.endswith('.png'): continue


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

--
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
___
Matplotlib-checkins mailing list
Matplotlib-checkins@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-checkins


SF.net SVN: matplotlib:[7991] branches/v0_99_maint/examples/event_handling/ looking_glass.py

2009-11-30 Thread mdboom
Revision: 7991
  http://matplotlib.svn.sourceforge.net/matplotlib/?rev=7991view=rev
Author:   mdboom
Date: 2009-11-30 18:30:09 + (Mon, 30 Nov 2009)

Log Message:
---
Fix bug in usage of contains

Modified Paths:
--
branches/v0_99_maint/examples/event_handling/looking_glass.py

Modified: branches/v0_99_maint/examples/event_handling/looking_glass.py
===
--- branches/v0_99_maint/examples/event_handling/looking_glass.py   
2009-11-30 17:39:37 UTC (rev 7990)
+++ branches/v0_99_maint/examples/event_handling/looking_glass.py   
2009-11-30 18:30:09 UTC (rev 7991)
@@ -24,7 +24,7 @@
   if event.inaxes!=ax:
  return
 
-  if not circ.contains(event):
+  if not circ.contains(event)[0]:
  return
 
   self.pressevent = event


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

--
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
___
Matplotlib-checkins mailing list
Matplotlib-checkins@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-checkins


SF.net SVN: matplotlib:[7992] trunk/matplotlib/make.osx

2009-11-30 Thread jdh2358
Revision: 7992
  http://matplotlib.svn.sourceforge.net/matplotlib/?rev=7992view=rev
Author:   jdh2358
Date: 2009-11-30 21:13:34 + (Mon, 30 Nov 2009)

Log Message:
---
add Matthew's OSX makefile patch

Modified Paths:
--
trunk/matplotlib/make.osx

Modified: trunk/matplotlib/make.osx
===
--- trunk/matplotlib/make.osx   2009-11-30 18:30:09 UTC (rev 7991)
+++ trunk/matplotlib/make.osx   2009-11-30 21:13:34 UTC (rev 7992)
@@ -4,21 +4,24 @@
 PYVERSION=2.6
 PYTHON=python${PYVERSION}
 ZLIBVERSION=1.2.3
-PNGVERSION=1.2.33
-FREETYPEVERSION=2.3.5
+PNGVERSION=1.2.40
+FREETYPEVERSION=2.3.11
 MACOSX_DEPLOYMENT_TARGET=10.4
+OSX_SDK_VER=10.4u
+ARCH_FLAGS=-arch i386 -arch ppc -arch x86_64
 
 ## You shouldn't need to configure past this point
 
 PKG_CONFIG_PATH=${PREFIX}/lib/pkgconfig
-CFLAGS=-arch i386 -arch ppc -I${PREFIX}/include -I${PREFIX}/include/freetype2 
-isysroot /Developer/SDKs/MacOSX10.4u.sdk
-LDFLAGS=-arch i386 -arch ppc -L${PREFIX}/lib 
-syslibroot,/Developer/SDKs/MacOSX10.4u.sdk
+CFLAGS=${ARCH_FLAGS} -I${PREFIX}/include -I${PREFIX}/include/freetype2 
-isysroot /Developer/SDKs/MacOSX${OSX_SDK_VER}.sdk
+LDFLAGS=${ARCH_FLAGS} -L${PREFIX}/lib 
-syslibroot,/Developer/SDKs/MacOSX${OSX_SDK_VER}.sdk
 
 clean:
rm -rf zlib-${ZLIBVERSION}.tar.gz libpng-${PNGVERSION}.tar.bz2 \
freetype-${FREETYPEVERSION}.tar.bz2 
bdist_mpkg-${BDISTMPKGVERSION}.tar.gz \
bdist_mpkg-${BDISTMPKGVERSION} \
-   zlib-${ZLIBVERSION} libpng-${PNGVERSION} freetype-${FREETYPEVERSION}
+   zlib-${ZLIBVERSION} libpng-${PNGVERSION} freetype-${FREETYPEVERSION} \
+   build
 
 fetch:
${PYTHON} -c 'import urllib; 
urllib.urlretrieve(http://www.zlib.net/zlib-${ZLIBVERSION}.tar.gz;, 
zlib-${ZLIBVERSION}.tar.gz)'  \


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

--
Join us December 9, 2009 for the Red Hat Virtual Experience,
a free event focused on virtualization and cloud computing. 
Attend in-depth sessions from your desk. Your couch. Anywhere.
http://p.sf.net/sfu/redhat-sfdev2dev
___
Matplotlib-checkins mailing list
Matplotlib-checkins@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-checkins


SF.net SVN: matplotlib:[7993] trunk/matplotlib/lib/matplotlib/quiver.py

2009-11-30 Thread efiring
Revision: 7993
  http://matplotlib.svn.sourceforge.net/matplotlib/?rev=7993view=rev
Author:   efiring
Date: 2009-11-30 21:38:58 + (Mon, 30 Nov 2009)

Log Message:
---
Make the kwarg combination units='xy', angles='xy', scale=1 work as expected

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

Modified: trunk/matplotlib/lib/matplotlib/quiver.py
===
--- trunk/matplotlib/lib/matplotlib/quiver.py   2009-11-30 21:13:34 UTC (rev 
7992)
+++ trunk/matplotlib/lib/matplotlib/quiver.py   2009-11-30 21:38:58 UTC (rev 
7993)
@@ -64,7 +64,7 @@
 
 Keyword arguments:
 
-  *units*: ['width' | 'height' | 'dots' | 'inches' | 'x' | 'y' ]
+  *units*: ['width' | 'height' | 'dots' | 'inches' | 'x' | 'y' | 'xy']
 arrow units; the arrow dimensions *except for length* are in
 multiples of this unit.
 
@@ -518,17 +518,33 @@
 self.set_transform(trans)
 return trans
 
-def _angles(self, U, V, eps=0.001):
+def _angles_lengths(self, U, V, eps=1):
 xy = self.ax.transData.transform(self.XY)
 uv = np.hstack((U[:,np.newaxis], V[:,np.newaxis]))
 xyp = self.ax.transData.transform(self.XY + eps * uv)
 dxy = xyp - xy
-ang = np.arctan2(dxy[:,1], dxy[:,0])
-return ang
+angles = np.arctan2(dxy[:,1], dxy[:,0])
+lengths = np.absolute(dxy[:,0] + dxy[:,1]*1j) / eps
+return angles, lengths
 
+
+
 def _make_verts(self, U, V):
 uv = (U+V*1j)
-a = np.absolute(uv)
+if self.angles == 'xy' and self.scale_units == 'xy':
+# Here eps is 1 so that if we get U, V by diffing
+# the X, Y arrays, the vectors will connect the
+# points, regardless of the axis scaling (including log).
+angles, lengths = self._angles_lengths(U, V, eps=1)
+elif self.angles == 'xy' or self.scale_units == 'xy':
+# We could refine this by calculating eps based on
+# the magnitude of U, V relative to that of X, Y,
+# to ensure we are always making small shifts in X, Y.
+angles, lengths = self._angles_lengths(U, V, eps=0.001)
+if self.scale_units == 'xy':
+a = lengths
+else:
+a = np.absolute(uv)
 if self.scale is None:
 sn = max(10, math.sqrt(self.N))
 if self.Umask is not ma.nomask:
@@ -543,14 +559,17 @@
 self.scale = scale
 widthu_per_lenu = 1.0
 else:
-dx = self._dots_per_unit(self.scale_units)
+if self.scale_units == 'xy':
+dx = 1
+else:
+dx = self._dots_per_unit(self.scale_units)
 widthu_per_lenu = dx/self._trans_scale
 if self.scale is None:
 self.scale = scale * widthu_per_lenu
 length = a * (widthu_per_lenu / (self.scale * self.width))
 X, Y = self._h_arrows(length)
 if self.angles == 'xy':
-theta = self._angles(U, V)
+theta = angles
 elif self.angles == 'uv':
 theta = np.angle(uv)
 else:


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

--
Join us December 9, 2009 for the Red Hat Virtual Experience,
a free event focused on virtualization and cloud computing. 
Attend in-depth sessions from your desk. Your couch. Anywhere.
http://p.sf.net/sfu/redhat-sfdev2dev
___
Matplotlib-checkins mailing list
Matplotlib-checkins@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-checkins