SF.net SVN: matplotlib: [4978] trunk/matplotlib/doc/devel/ add_new_projection.rst

2008-02-19 Thread mdboom
Revision: 4978
  http://matplotlib.svn.sourceforge.net/matplotlib/?rev=4978&view=rev
Author:   mdboom
Date: 2008-02-19 07:35:45 -0800 (Tue, 19 Feb 2008)

Log Message:
---
Fix typo.

Modified Paths:
--
trunk/matplotlib/doc/devel/add_new_projection.rst

Modified: trunk/matplotlib/doc/devel/add_new_projection.rst
===
--- trunk/matplotlib/doc/devel/add_new_projection.rst   2008-02-19 15:26:56 UTC 
(rev 4977)
+++ trunk/matplotlib/doc/devel/add_new_projection.rst   2008-02-19 15:35:45 UTC 
(rev 4978)
@@ -99,4 +99,4 @@
 
 A full-fledged and heavily annotated example is in
 ``examples/custom_projection_example.py``.  The polar plot
-functionality in ``polar.py`` may also be interest.
+functionality in ``polar.py`` may also be of interest.


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: [4980] trunk/matplotlib/lib/matplotlib/lines.py

2008-02-19 Thread mdboom
Revision: 4980
  http://matplotlib.svn.sourceforge.net/matplotlib/?rev=4980&view=rev
Author:   mdboom
Date: 2008-02-19 07:56:10 -0800 (Tue, 19 Feb 2008)

Log Message:
---
Remove debugging code.

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

Modified: trunk/matplotlib/lib/matplotlib/lines.py
===
--- trunk/matplotlib/lib/matplotlib/lines.py2008-02-19 15:52:06 UTC (rev 
4979)
+++ trunk/matplotlib/lib/matplotlib/lines.py2008-02-19 15:56:10 UTC (rev 
4980)
@@ -75,9 +75,6 @@
 """Determine if any line segments are within radius of a point. Returns
 the list of line segments that are within that radius.
 """
-import pdb
-pdb.set_trace()
-
 # Process single points specially
 if len(x) < 2:
 res, = npy.nonzero( (cx - x)**2 + (cy - y)**2 <= radius**2 )


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

2008-02-19 Thread mdboom
Revision: 4979
  http://matplotlib.svn.sourceforge.net/matplotlib/?rev=4979&view=rev
Author:   mdboom
Date: 2008-02-19 07:52:06 -0800 (Tue, 19 Feb 2008)

Log Message:
---
Fixing picking on masked arrays (Thanks Andrew Straw)

Modified Paths:
--
trunk/matplotlib/lib/matplotlib/axes.py
trunk/matplotlib/lib/matplotlib/lines.py

Modified: trunk/matplotlib/lib/matplotlib/axes.py
===
--- trunk/matplotlib/lib/matplotlib/axes.py 2008-02-19 15:35:45 UTC (rev 
4978)
+++ trunk/matplotlib/lib/matplotlib/axes.py 2008-02-19 15:52:06 UTC (rev 
4979)
@@ -215,7 +215,8 @@
 b = self.axes.yaxis.update_units(y)
 if b: return npy.arange(len(y)), y, False
 
-y = ma.asarray(y)
+if not ma.isMaskedArray(y):
+y = npy.asarray(y)
 if len(y.shape) == 1:
 y = y[:,npy.newaxis]
 nr, nc = y.shape

Modified: trunk/matplotlib/lib/matplotlib/lines.py
===
--- trunk/matplotlib/lib/matplotlib/lines.py2008-02-19 15:35:45 UTC (rev 
4978)
+++ trunk/matplotlib/lib/matplotlib/lines.py2008-02-19 15:52:06 UTC (rev 
4979)
@@ -75,6 +75,9 @@
 """Determine if any line segments are within radius of a point. Returns
 the list of line segments that are within that radius.
 """
+import pdb
+pdb.set_trace()
+
 # Process single points specially
 if len(x) < 2:
 res, = npy.nonzero( (cx - x)**2 + (cy - y)**2 <= radius**2 )
@@ -97,7 +100,7 @@
 # following radius test eliminates these ambiguities.
 point_hits = (cx - x)**2 + (cy - y)**2 <= radius**2
 #if any(point_hits): print "points",xr[candidates]
-candidates = candidates & ~point_hits[:-1] & ~point_hits[1:]
+candidates = candidates & ~(point_hits[:-1] | point_hits[1:])
 
 # For those candidates which remain, determine how far they lie away
 # from the line.
@@ -308,7 +311,7 @@
 # transform in backend
 if len(self._xy)==0: return False,{}
 
-xyt = self.get_transform().transform(self._xy)
+xyt = self._transformed_path.get_fully_transformed_path().vertices
 xt = xyt[:, 0]
 yt = xyt[:, 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: [4981] trunk/matplotlib/lib/matplotlib/path.py

2008-02-19 Thread mdboom
Revision: 4981
  http://matplotlib.svn.sourceforge.net/matplotlib/?rev=4981&view=rev
Author:   mdboom
Date: 2008-02-19 11:41:53 -0800 (Tue, 19 Feb 2008)

Log Message:
---
Don't cache many-sided unit regular polygons -- just the small ones --
otherwise we could end up caching many large things.

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

Modified: trunk/matplotlib/lib/matplotlib/path.py
===
--- trunk/matplotlib/lib/matplotlib/path.py 2008-02-19 15:56:10 UTC (rev 
4980)
+++ trunk/matplotlib/lib/matplotlib/path.py 2008-02-19 19:41:53 UTC (rev 
4981)
@@ -317,7 +317,10 @@
 Returns a Path for a unit regular polygon with the given
 numVertices and radius of 1.0, centered at (0, 0).
 """
-path = cls._unit_regular_polygons.get(numVertices)
+if numVertices <= 16:
+path = cls._unit_regular_polygons.get(numVertices)
+else:
+path = None
 if path is None:
 theta = (2*npy.pi/numVertices *
  npy.arange(numVertices + 1).reshape((numVertices + 1, 1)))
@@ -337,7 +340,10 @@
 Returns a Path for a unit regular star with the given
 numVertices and radius of 1.0, centered at (0, 0).
 """
-path = cls._unit_regular_stars.get((numVertices, innerCircle))
+if numVertices <= 16:
+path = cls._unit_regular_stars.get((numVertices, innerCircle))
+else:
+path = None
 if path is None:
 ns2 = numVertices * 2
 theta = (2*npy.pi/ns2 * npy.arange(ns2 + 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: [4983] trunk/matplotlib/src/_path.cpp

2008-02-19 Thread mdboom
Revision: 4983
  http://matplotlib.svn.sourceforge.net/matplotlib/?rev=4983&view=rev
Author:   mdboom
Date: 2008-02-19 13:33:26 -0800 (Tue, 19 Feb 2008)

Log Message:
---
Fix memory leaks and uninitialized memory errors discovered with valgrind.

Modified Paths:
--
trunk/matplotlib/src/_path.cpp

Modified: trunk/matplotlib/src/_path.cpp
===
--- trunk/matplotlib/src/_path.cpp  2008-02-19 21:32:48 UTC (rev 4982)
+++ trunk/matplotlib/src/_path.cpp  2008-02-19 21:33:26 UTC (rev 4983)
@@ -309,6 +309,8 @@
 extents_data[1] = std::numeric_limits::infinity();
 extents_data[2] = -std::numeric_limits::infinity();
 extents_data[3] = -std::numeric_limits::infinity();
+xm = std::numeric_limits::infinity();
+ym = std::numeric_limits::infinity();
 
 ::get_path_extents(path, trans,
&extents_data[0], &extents_data[1], 
&extents_data[2], &extents_data[3],
@@ -320,7 +322,7 @@
 throw;
 }
 
-return Py::Object((PyObject*)extents);
+return Py::Object((PyObject*)extents, true);
 }
 
 Py::Object _path_module::update_path_extents(const Py::Tuple& args)
@@ -474,6 +476,8 @@
 y0 = std::numeric_limits::infinity();
 x1 = -std::numeric_limits::infinity();
 y1 = -std::numeric_limits::infinity();
+xm = std::numeric_limits::infinity();
+ym = std::numeric_limits::infinity();
 agg::trans_affine trans;
 
 for (i = 0; i < N; ++i)


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: [4982] trunk/matplotlib/examples/backend_driver.py

2008-02-19 Thread mdboom
Revision: 4982
  http://matplotlib.svn.sourceforge.net/matplotlib/?rev=4982&view=rev
Author:   mdboom
Date: 2008-02-19 13:32:48 -0800 (Tue, 19 Feb 2008)

Log Message:
---
Add valgrind memcheck support to backend_driver.py

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

Modified: trunk/matplotlib/examples/backend_driver.py
===
--- trunk/matplotlib/examples/backend_driver.py 2008-02-19 19:41:53 UTC (rev 
4981)
+++ trunk/matplotlib/examples/backend_driver.py 2008-02-19 21:32:48 UTC (rev 
4982)
@@ -147,6 +147,7 @@
 continue
 
 print ('\tdriving %-40s' % (fname)),
+sys.stdout.flush()
 basename, ext = os.path.splitext(fname)
 outfile = os.path.join(path,basename)
 tmpfile_name = '_tmp_%s.py' % basename
@@ -180,7 +181,8 @@
 
 tmpfile.close()
 start_time = time.time()
-run(python + [tmpfile_name, switchstring])
+program = [x % {'name': basename} for x in python]
+run(program + [tmpfile_name, switchstring])
 end_time = time.time()
 print (end_time - start_time)
 #os.system('%s %s %s' % (python, tmpfile_name, switchstring))
@@ -192,6 +194,10 @@
 if '--coverage' in sys.argv:
 python = ['coverage.py', '-x']
 sys.argv.remove('--coverage')
+elif '--valgrind' in sys.argv:
+python = ['valgrind', '--tool=memcheck', '--leak-check=yes',
+  '--log-file=%(name)s', 'python']
+sys.argv.remove('--valgrind')
 elif sys.platform == 'win32':
 python = [r'c:\Python24\python.exe']
 else:


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