On 2/9/11 7:51 AM, Bruce Ford wrote: > I am attempting to plot a line atop a basemap instance called "m". I > can do this without a problem with: > > plot = m.plot(lon,lat,'r-') #lon and lat are lists > > However, I'd like to color the line based on a third list called > "intensity." For instance, if the value of intensity between two > points is 0-35 make it green, 35-70 make it yellow, etc. > > I have studied this example: > http://www.scipy.org/Cookbook/Matplotlib/MulticoloredLine but I cannot > get a collection added to the figure without errors. > > Has anyone done similar? > > Thanks!
Bruce: Can you show us how you are doing it (and what the error message is)? You should just be able to add the line collection to the axes instance that the Basemap instance is drawing on. -J -- Jeffrey S. Whitaker Phone : (303)497-6313 Meteorologist FAX : (303)497-6449 NOAA/OAR/PSD R/PSD1 Email : jeffrey.s.whita...@noaa.gov 325 Broadway Office : Skaggs Research Cntr 1D-113 Boulder, CO, USA 80303-3328 Web : http://tinyurl.com/5telg ------------------------------------------------------------------------------ The ultimate all-in-one performance toolkit: Intel(R) Parallel Studio XE: Pinpoint memory and threading errors before they happen. Find and fix more than 250 security defects in the development cycle. Locate bottlenecks in serial and parallel code that limit performance. http://p.sf.net/sfu/intel-dev2devfeb _______________________________________________ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users