Color a line segment as a gradient?

Hi all,

Does anyone have a good solution for taking a line segment and coloring it according to some gradient (where the start and end colors are the only two things specified for the line coloring)?

Thanks!

Uri

Uri Laserson
Graduate Student, Biomedical Engineering

Harvard-MIT Division of Health Sciences and Technology
M +1 917 742 8019
laserson@…1166…

This example shows how to apply a colormap to a line segment

http://matplotlib.sourceforge.net/examples/pylab_examples/line_collection2.html

JDH

···

On Thu, Sep 29, 2011 at 11:56 PM, Uri Laserson <laserson@...1166...> wrote:

Hi all,
Does anyone have a good solution for taking a line segment and coloring it
according to some gradient (where the start and end colors are the only two
things specified for the line coloring)?

This example might be closer to the request:
http://matplotlib.sourceforge.net/examples/pylab_examples/multicolored_line.html

Eric

···

On 09/30/2011 09:12 AM, John Hunter wrote:

On Thu, Sep 29, 2011 at 11:56 PM, Uri Laserson<laserson@...1166...> wrote:

Hi all,
Does anyone have a good solution for taking a line segment and coloring it
according to some gradient (where the start and end colors are the only two
things specified for the line coloring)?

This example shows how to apply a colormap to a line segment

http://matplotlib.sourceforge.net/examples/pylab_examples/line_collection2.html

JDH