Tutorials
Reaction-Diffution Equations: Turing Instability
![](https://www.google.com/images/icons/product/drive-32.png)
I discuss some of the important aspect of GNUPLOT. In the following I give a script to plot four subplots in a multiplot. The datafile files may be obtained from the LINK (sniper_chimera.txt) provided.
save the following script as "filename.plt"
MULTIPLOT.PLT
set term postscript landscape enhanced defaultplex \
leveldefault color colortext \
dashlength 1.0 linewidth 1.0 butt noclip nobackground \
palfuncparam 2000,0.003 "TeXGyreSchola-Bold" 20 fontscale 1.0
set out "sniper_sym_mf_N100_R35_s1_b9_Q65_e400.ps"
set size 1.1, 1.0
set multiplot
set border lw 2.0 front
set colorbox horiz user origin 0.13,0.94 size 0.45,0.025
#Spatiotemporal x1
set origin 0.07, 0.0
set size 0.33, 1.0
set palette rgbformula 33,13,10
set cbrange [-1:1]
set yrange [2000:0]
unset key
set xlabel "i" font "TeXGyreSchola-Bold, 20"
set ylabel "Time" font "TeXGyreSchola-Bold, 20"
set xtics 50
set obj 4 rect at 0,60 size 70,300 front
set label 4 at 0,0 "(a)" font "TeXGyreSchola-Bold, 20" front offset 1,-1
set obj 1 rect at 50,60 size 50,300 front
set label 1 at 50,0 "x_1" font "TeXGyreSchola-Bold, 20" front offset 0,-1
set view map
splot "sniper_chimera.txt" u 2:1:3 every :2:::99:1010 w image
unset xlabel
unset ylabel
unset obj
unset label
#Spatiotemporal x2
set origin 0.32, 0.0
set size 0.33, 1.0
set palette rgbformula 33,13,10
set cbrange [-1:1]
set yrange [2000:0]
unset colorbox
set xlabel "i" font "TeXGyreSchola-Bold, 20"
# set ylabel "t" font "TeXGyreSchola-Bold, 20"
# set xtics 50
unset ytics
set obj 4 rect at 0,60 size 70,300 front
set label 4 at 0,0 "(b)" font "TeXGyreSchola-Bold, 20" front offset 1,-1
set obj 1 rect at 50,60 size 50,300 front
set label 1 at 50,0 "x_2" font "TeXGyreSchola-Bold, 20" front offset 0,-1
set view map
splot "sniper_chimera.txt" u 2:1:5 every :2:::99:1010 w image
unset obj
unset label
#Snapshot x1
set origin 0.6, 0.48
set size 0.5, 0.45
set xlabel "i" font "TeXGyreSchola-Bold, 20"
set ylabel "x_1_i" font "TeXGyreSchola-Bold, 20"
set xtics 50
set ytics 1
set obj 4 rect at 0,1 size 40,1.2 front
set label 4 at 0,1 "(c)" font "TeXGyreSchola-Bold, 20" front offset 1,-1
plot [][-1:1]"sniper_chimera.txt" u ($1==1990?$2:1/0):3 w l lc rgb "red" lt 3, "" u ($1==1990?$2:1/0):3 w p pt 6 lc rgb "blue" lw 2
unset obj
unset label
#Snapshot x2
set origin 0.6, 0.05
set size 0.5, 0.45
set xlabel "i" font "TeXGyreSchola-Bold, 20"
set ylabel "x_2_i" font "TeXGyreSchola-Bold, 20"
set xtics 50
set obj 4 rect at 0,1 size 40,1.2 front
set label 4 at 0,1 "(d)" font "TeXGyreSchola-Bold, 20" front offset 1,-1
plot [][-1:1]"sniper_chimera.txt" u ($1==1990?$2:1/0):5 w l lc rgb "blue" lt 3, "" u ($1==1990?$2:1/0):5 w p pt 6 lc rgb "red" lw 2
unset obj
unset label
unset multiplot
reset