Revision: 6424
http://matplotlib.svn.sourceforge.net/matplotlib/?rev=6424&view=rev
Author: jdh2358
Date: 2008-11-20 20:22:08 +0000 (Thu, 20 Nov 2008)
Log Message:
-----------
reverted a bug I introduced when toying around with copy region in agg
Modified Paths:
--------------
trunk/matplotlib/examples/event_handling/path_editor.py
trunk/matplotlib/lib/matplotlib/collections.py
trunk/matplotlib/src/_backend_agg.cpp
Modified: trunk/matplotlib/examples/event_handling/path_editor.py
===================================================================
--- trunk/matplotlib/examples/event_handling/path_editor.py 2008-11-20
18:58:54 UTC (rev 6423)
+++ trunk/matplotlib/examples/event_handling/path_editor.py 2008-11-20
20:22:08 UTC (rev 6424)
@@ -1,3 +1,5 @@
+import matplotlib
+matplotlib.use('TkAgg')
import numpy as np
import matplotlib.path as mpath
import matplotlib.patches as mpatches
Modified: trunk/matplotlib/lib/matplotlib/collections.py
===================================================================
--- trunk/matplotlib/lib/matplotlib/collections.py 2008-11-20 18:58:54 UTC
(rev 6423)
+++ trunk/matplotlib/lib/matplotlib/collections.py 2008-11-20 20:22:08 UTC
(rev 6424)
@@ -701,6 +701,9 @@
theseverts = []
xslice = x[ind0:ind1]
yslice = y[ind0:ind1]
+ if not len(xslice):
+ continue
+
N = len(xslice)
X = np.zeros((2*N+2, 2), np.float)
X[0] = xslice[0], yboundary
@@ -750,6 +753,8 @@
xranges = []
for ind0, ind1 in mlab.contiguous_regions(mask):
xslice = x[ind0:ind1]
+ if not len(xslice):
+ continue
xranges.append((xslice[0], xslice[-1]-xslice[0]))
collection = BrokenBarHCollection(xranges, [ymin, ymax-ymin], **kwargs)
Modified: trunk/matplotlib/src/_backend_agg.cpp
===================================================================
--- trunk/matplotlib/src/_backend_agg.cpp 2008-11-20 18:58:54 UTC (rev
6423)
+++ trunk/matplotlib/src/_backend_agg.cpp 2008-11-20 20:22:08 UTC (rev
6424)
@@ -386,7 +386,7 @@
throw Py::TypeError("Invalid bbox provided to copy_from_bbox");
// std::cout << l << " " << b << " " << r << " " << t << " " << (height -
(int)b) << " " << height - (int)t << std::endl;
- agg::rect_i rect((int)l, height - (int)b, (int)r, height - (int)t);
+ agg::rect_i rect((int)l, height - (int)t, (int)r, height - (int)b);
BufferRegion* reg = NULL;
try {
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 the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Matplotlib-checkins mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/matplotlib-checkins