Back to demo index

gnuplot demo script: pm3dcolors.dem

autogenerated by webify.pl on Tue Apr 14 15:20:23 2009
gnuplot version gnuplot 4.3 patchlevel CVS-12Apr2009
#
# $Id: pm3dcolors.dem,v 1.3 2006/03/23 17:53:04 mikulik Exp $
#
# Test of new color modes for pm3d palettes.

#
#   Gradient Palettes
#
set pm3d; set palette
set palette color
set pm3d map
set cbrange [-10:10]
set xrange [-10:10]
set yrange [*:*]
unset ztics
unset ytics
set samples 101
set isosamples 2
set xtics 2

set palette model RGB

set palette defined 
set title "set palette defined"
splot x

Click here for minimal script to generate this plot





set palette defined (0 0 0 0, 1 0 0 1, 3 0 1 0, 4 1 0 0, 6 1 1 1)
set title 'set palette defined (0 0 0 0, 1 0 0 1, 3 0 1 0, 4 1 0 0, 6 1 1 1)'
splot x

Click here for minimal script to generate this plot





set palette defined ( 0 "green", 1 "blue", 2 "red", 3 "orange" ) 
set title 'set palette defined ( 0 "green", 1 "blue", 2 "red", 3 "orange" )'
splot x

Click here for minimal script to generate this plot





set palette defined ( 20 "#101010", 30 "#ff0000", 40 "#00ff00", 50 "#e0e0e0" ) 
set title 'set palette defined ( 20 "#101010", 30 "#ff0000", 40 "#00ff00", 50 "#e0e0e0" )'
splot x

Click here for minimal script to generate this plot





set palette defined ( 0 0 0 0, 1 1 1 1 )
set title 'set palette defined ( 0 0 0 0, 1 1 1 1 )'
splot x

Click here for minimal script to generate this plot





set palette model HSV defined ( 0 0 1 1, 1 1 1 1 )
set title 'set palette model HSV defined ( 0 0 1 1, 1 1 1 1 )'
splot x

Click here for minimal script to generate this plot





set palette model RGB
set palette model RGB defined (0 "green", 1 "dark-green", 1 "yellow", 2 "dark-yellow", 2 "red", 3 "dark-red" )
set title "set palette model RGB defined\n(0 'green', 1 'dark-green', 1 'yellow', 2 'dark-yellow', 2 'red', 3 'dark-red' )"
splot x

Click here for minimal script to generate this plot





set palette model RGB


set title 'set palette file "-" (file with 3 columns)'
set palette file "-"
0 0 0
0 0 1
0 1 0
1 0 0
1 1 1
e
splot x

Click here for minimal script to generate this plot





set title 'set palette file "-" (file with 4 columns)'
set palette file "-"
10 0 0 0
20 0 0 1
40 0 1 0
60 1 0 0
70 1 1 1
e
splot x

Click here for minimal script to generate this plot





set title 'set palette file "-" using 1:2:($1+$2)/2'
set palette file "-" using ($0):1:2:(($1+$2)/2)
0 0
0 1
1 0
1 1
e
splot x

Click here for minimal script to generate this plot






#
#    Color Models
#
set palette color
set pm3d map
set cbrange [-10:10]
set xrange [-10:10]
unset ztics
unset ytics
set samples 101
set isosamples 2
set xtics 2

set palette rgbformulae 7,5,15

set palette model RGB rgbformulae 7,5,15
set title "set palette model RGB rgbformulae 7,5,15"
splot x

Click here for minimal script to generate this plot





set palette model HSV rgbformulae 7,5,15
set title "set palette model HSV rgbformulae 7,5,15"
splot x

Click here for minimal script to generate this plot





set palette model XYZ rgbformulae 7,5,15
set title "set palette model XYZ rgbformulae 7,5,15"
splot x

Click here for minimal script to generate this plot





set palette model CMY rgbformulae 7,5,15
set title "set palette model CMY rgbformulae 7,5,15"
splot x

Click here for minimal script to generate this plot





set palette model YIQ rgbformulae 7,5,15
set title "set palette model YIQ rgbformulae 7,5,15"
splot x

Click here for minimal script to generate this plot





set palette model HSV rgbformulae 3,2,2
set title "set palette model HSV rrgbformulae 3,2,2"
splot x

Click here for minimal script to generate this plot






#
#   User Defined Functions
#
set palette color
set pm3d map
set cbrange [-10:10]
set xrange [-10:10]
set yrange [0:1]
unset ztics
unset ytics
set samples 101
set isosamples 2
set xtics 2

set palette model RGB

set palette functions gray, gray, gray
set title "set palette functions gray, gray, gray"
splot x

Click here for minimal script to generate this plot





set palette functions sqrt(gray), gray**3, sin(gray*2*pi) 
set title 'set palette functions sqrt(gray), gray**3, sin(gray*2*pi)  <--> 7,5,15'
splot x

Click here for minimal script to generate this plot





set palette rgbformulae 7,5,15
set title 'set palette rgbformulae 7,5,15'
splot x

Click here for minimal script to generate this plot





set palette model XYZ functions gray**0.35, gray**0.5, gray**0.8
set title 'set palette model XYZ functions model XYZ  gray**0.35, gray**0.5, gray**0.8'
splot x

Click here for minimal script to generate this plot





theta(x) = x<0 ? 0 : 1
r(x) = 4*x*(1-theta(x-0.25))
g(x) = 0.5*theta(x-0.25)*(1-theta(x-0.5))
b(x) = x
set palette model RGB functions r(gray),g(gray),b(gray)
set title "set palette model RGB functions\n4*x*(1-theta(x-0.25)), 0.5*theta(x-0.25)*(1-theta(x-0.5)), x"
splot x

Click here for minimal script to generate this plot