Mittwoch, 11. Dezember 2013

Gnuplot set linecolor from palette

In gnuplot you can set the color of a line in a plot by using:
 linecolor "COLOR" 

For example via, (linecolor is abbreviated via lc):
 plot sin(x) lc "blue"

But there are several others, including setting the linecolor from a palette, so according to the blog entry here and here. You set up a new color macro scheme and use it as a palette. This color palette you can then use to define the color of a line by using either the color of a colorbox (cb) value or a fractional value ranging from 0 to 1:
set palette @redgreenblue
plot sin(x) lc palette cb 1 
replot sin(x) lc palette frac 0.5 


More information can be found in gnuplot via:
help linecolor

Keine Kommentare:

Kommentar veröffentlichen