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?
Bruce W. Ford
Clear Science, Inc.