On Tue, Jun 19, 2012 at 12:06 PM, Alexander Crosby
<acro...@asascience.com>wrote:
> The code below is a stripped down version of the way i am implementing a
> clip operation, but it is slow and memory inefficient. Is there a way to
> do this without looping or just faster, perhaps with a
> PolygonCollection?
>
> I have code that finds the perimeter path of a triangulation like this,
> but it turns out that my topology is not well formed enough for it to
> work. Is there a hidden matplotlib method to combine or dissolve
> Polygons/Patches?
>
> Thanks,
> Alex
>
>
I have found the Shapely library to be 2-4 times faster in performing
topology related operations out-of-the-box than my own hand-optimized
utilizations of matplotlib internals (of course, combining my optimizations
with shapely yielded insanely fast performance, but at a loss of
generality). It would require re-working of your existing code, but if
performance is the bottle-neck, shapely is the way to go.
Cheers!
Ben Root
------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and
threat landscape has changed and how IT managers can respond. Discussions
will include endpoint security, mobile security and the latest in malware
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users