|
From: Thomas S. <t.s...@fz...> - 2009-02-14 09:27:00
|
cbrange is mapped to the gray intervall from 0.0 to 1.0, so the color functions work in this range. to get higher z-values, define cbrange: zmin=1.5 zmax=6.5 # a mapping function needed to calculate the color zval(x)=(x-zmin)/(zmax-zmin) # set cbrange [zmin:zmax] # color functions green(x)=x<=zval(2.5)?1.0:(x>zval(4.5)&&x<=zval(5.5)?1.0:0.0) red(x)=x>zval(2.5)&&x<=zval(3.5)?1.0:(x>zval(4.5)?1.0:0.0) blue(x)=x>zval(3.5)&&x<=zval(4.5)?1.0:(x>zval(5.5)?1.0:0.0) # set palette functions red(gray),green(gray),blue(gray) test palette # an example plot splot [0:4] [0:4] x+y with pm3d ranlot wrote: > > Really helpful. How would you modify this piece of code to include colors > for z values higher than 1. For example: > z = 2 --> green > z = 3 --> red > z = 4 --> blue > z = 5 --> something else > z = 6 --> yet even another color. > > > Thomas Sefzick wrote: >> >> >> set palette functions 0,(gray>0.5?1.:0.),(gray<=0.5?1.:0.) >> >> > > -- View this message in context: http://www.nabble.com/Coloring-2D-data-points---No-palette-interpolation-tp21958296p22010723.html Sent from the Gnuplot - User mailing list archive at Nabble.com. |