|
From: Ethan A M. <EAM...@gm...> - 2013-03-29 01:53:08
|
On Thursday, 28 March 2013, Paul Wagner wrote: > Hello, > > how can I plot a function and vary its color within the plot? What do you want the color to depend on? > The only solution I've come up with is to write the x and y values to a file and > read it back using 'linecolor rgb variable'. Is there a more elegant > way, without writing a file? set xrange [XMIN:XMAX] plot '+' using 1:(f($1)):(color($1)) lc rgb variable where f(x) is the function you want to plot and color(x) returns the color you want it to have. |