Does anyone know of an easy way to plot, say, sin(x)
, such that the colour changes depending on the y-value?
set palette defined (0 "blue", 1 "green")
plot sin(x) lc palette frac abs(sin(x))
Also doesn't work!
Any ideas?
Thanks.
Does anyone know of an easy way to plot, say, sin(x)
, such that the colour changes depending on the y-value?
set palette defined (0 "blue", 1 "green")
plot sin(x) lc palette frac abs(sin(x))
Also doesn't work!
Any ideas?
Thanks.
You can try to use the special filename '+'
to internally generates a list of values (x values as $1) and then use those values to plot what you want using the third column to play with your palette.
set palette defined (0 "blue", 1 "green")
plot '+' u ($1):(sin($1)):(abs(sin($1))) with lines palette