|
From: Zane S. <za...@id...> - 2008-08-25 16:45:52
|
On Aug 22, 2008, at 5:08 AM, Jeff Whitaker wrote: > Zane Selvans wrote: >> I'm drawing several hundred lines at a time, each consisting of >> 10-100 points, and it takes a couple of minutes for them all to >> display, which makes me think I must be doing something stupid. >> > Zane: You can set up a LineCollection like this > > lcoll = LineCollection(segments) > > then add it to the current axes > > ax = pylab.gca() > ax.add_collection(lcoll) > > (instead of using the Basemap plot method). It turned out that just adding: interactive(False) before the drawing loop, and show() after it, sped things up tremendously. Instead of 5 minutes, it now takes about 2 seconds for the map to render. Which, ironically, is much more "interactive" :) Thanks for the pointer to LineCollection though. I'd never seen that. Zane -- Zane Selvans Amateur Earthling http://zaneselvans.org za...@id... 303/815-6866 PGP Key: 55E0815F |