Menu

Changing color along the line of a 2D plot

Help
2014-03-27
2014-03-27
  • Martin Kretschmar

    Hello everyone,

    i would like to plot a 2D graph, e.g. a gaussian profile, in gnuplot with a changing color along its line.
    The result should look similar to this example:

    http://www.physics.unr.edu/ntf/images/laser2.jpg

    In one example, i would like to have the colorgradient along the 2d line, in the other example i would like it to look similar to the linked image, which means with filledlines or s.th. similar.

    Thanks in advance for your support.

    Cheers

     
  • Ethan Merritt

    Ethan Merritt - 2014-03-27

    gradient along line:
    plot $foo using 1:(f($1)):(color($1)) with lines lc variable

    gradient fill:
    not possible in gnuplot

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.