Friday, August 19, 2011

3x3 box and whiskers

reset

set yrange [y1:y2] # where y1 < y2

set xrange [x1:x2] # where x1 < x2

set lmargin 0.5
set bmargin 0.5
set tmargin 0.5
set rmargin 0.5

set boxwidth 0.5 absolute

unset bars

set style fill solid 0.25
set style line 1 lw 3
set grid ytics

set terminal postscript eps enhanced color 'Helvetica' 16 size 5,5

# ==================================
# !!! - Graph for Group_I - DUMMY - !!!
# ==================================

# you gotta run a dummy first because there's some problem with extra tics showing up in the 2nd row of graphs in the first output - this will disappear from subsequent plots generated in the script. This might be glaringly obvious if you want generate more than one cluster of graphs per script.

set output "path/to/Outfile.eps"

set multiplot layout 3,3 scale 1,1 offset 0.5,0.5

set x2tics ("|" x1, "section 1" x1.1, "|" x1.25, "section 2" x1.5, "|" x1.75, "section 3" , "|" x2) font 'Helvetica,11'
set format x ""
set format y
set ylabel "MinorY-1"
set ytics (ytic1,ytic2,ytic3,...,ytic) # where ytic(x) are all some numerical value
plot '/path/to/file/GraphData1.txt' using x:y2:y1:y5:y4 with candlesticks whiskerbars lt -1 title "", '' using x:y3 with linespoints title "" pt 5 lt -1 # where x is the column with the x-coordinates and y1<y2<y3<y4<y5
#unset ytics

set format y ""
set ylabel " "
set title "Cluster Title"
plot '/path/to/file/GraphData2.txt' using x:y2:y1:y5:y4 with candlesticks whiskerbars lt -1 title "", '' using x:y3 with linespoints title "" pt 5 lt -1

set format y ""
set ylabel ""
set title " "
plot '/path/to/file/GraphData3.txt' using x:y2:y1:y5:y4 with candlesticks whiskerbars lt -1 title "", '' using x:y3 with linespoints title "" pt 5 lt -1

unset x2tics
set format y
set ylabel "MajorY (Major y unit) \n \n MinorY-2"
set ytics (ytic1,ytic2,ytic3,...,ytic) # where ytic(x) are all some numerical value
plot '/path/to/file/GraphData4.txt' using x:y2:y1:y5:y4 with candlesticks whiskerbars lt -1 title "", '' using x:y3 with linespoints title "" pt 5 lt -1
#unset ytics

set format y ""
set ylabel ""
plot '/path/to/file/GraphData5.txt' using x:y2:y1:y5:y4 with candlesticks whiskerbars lt -1 title "", '' using x:y3 with linespoints title "" pt 5 lt -1

plot '/path/to/file/GraphData6.txt' using x:y2:y1:y5:y4 with candlesticks whiskerbars lt -1 title "", '' using x:y3 with linespoints title "" pt 5 lt -1

#set xtics border in scale 1,0.5 nomirror rotate by +45 offset character 0, 0, 0
set xtics border in scale 1,1 nomirror rotate by +90 offset character 0, -4, 0
set xtics ("xtic1" 1, "xtic2" 2, ..., "xtic" x2)
set format x

set ylabel "MinorY-3"
set xlabel "MinorX-1"
set format y
set ytics (ytic1,ytic2,ytic3,...,ytic) # where ytic(x) are all some numerical value
plot '/path/to/file/GraphData7.txt' using x:y2:y1:y5:y4 with candlesticks whiskerbars lt -1 title "", '' using x:y3 with linespoints title "" pt 5 lt -1
#unset ytics

set format y ""
set ylabel ""
set xlabel "MinorX-2"
plot '/path/to/file/GraphData8.txt' using x:y2:y1:y5:y4 with candlesticks whiskerbars lt -1 title "", '' using x:y3 with linespoints title "" pt 5 lt -1

set xlabel "MinorX-3"
plot '/path/to/file/GraphData9.txt' using x:y2:y1:y5:y4 with candlesticks whiskerbars lt -1 title "", '' using x:y3 with linespoints title "" pt 5 lt -1

set xlabel ""

unset xtics

unset multiplot

set output

# ==================================
# !!! - Graph for Group_I - ACTUAL - !!!
# ==================================

# you can repeat this as many times as necessary in a single script. The dummy needs to be run only _once_.

set output "path/to/OutfileACTUAL.eps"

set multiplot layout 3,3 scale 1,1 offset 0.5,0.5

set x2tics ("|" x1, "section 1" x1.1, "|" x1.25, "section 2" x1.5, "|" x1.75, "section 3" , "|" x2) font 'Helvetica,11'
set format x ""
set format y
set ylabel "MinorY-1"
set ytics (ytic1,ytic2,ytic3,...,ytic) # where ytic(x) are all some numerical value
plot '/path/to/file/GraphData1.txt' using x:y2:y1:y5:y4 with candlesticks whiskerbars lt -1 title "", '' using x:y3 with linespoints title "" pt 5 lt -1
#unset ytics

set format y ""
set ylabel " "
set title "Cluster Title"
plot '/path/to/file/GraphData2.txt' using x:y2:y1:y5:y4 with candlesticks whiskerbars lt -1 title "", '' using x:y3 with linespoints title "" pt 5 lt -1

set format y ""
set ylabel ""
set title " "
plot '/path/to/file/GraphData3.txt' using x:y2:y1:y5:y4 with candlesticks whiskerbars lt -1 title "", '' using x:y3 with linespoints title "" pt 5 lt -1

unset x2tics
set format y
set ylabel "MajorY (Major y unit) \n \n MinorY-2"
set ytics (ytic1,ytic2,ytic3,...,ytic) # where ytic(x) are all some numerical value
plot '/path/to/file/GraphData4.txt' using x:y2:y1:y5:y4 with candlesticks whiskerbars lt -1 title "", '' using x:y3 with linespoints title "" pt 5 lt -1
#unset ytics

set format y ""
set ylabel ""
plot '/path/to/file/GraphData5.txt' using x:y2:y1:y5:y4 with candlesticks whiskerbars lt -1 title "", '' using x:y3 with linespoints title "" pt 5 lt -1

plot '/path/to/file/GraphData6.txt' using x:y2:y1:y5:y4 with candlesticks whiskerbars lt -1 title "", '' using x:y3 with linespoints title "" pt 5 lt -1

#set xtics border in scale 1,0.5 nomirror rotate by +45 offset character 0, 0, 0
set xtics border in scale 1,1 nomirror rotate by +90 offset character 0, -4, 0
set xtics ("xtic1" 1, "xtic2" 2, ..., "xtic" x2)
set format x

set ylabel "MinorY-3"
set xlabel "MinorX-1"
set format y
set ytics (ytic1,ytic2,ytic3,...,ytic) # where ytic(x) are all some numerical value
plot '/path/to/file/GraphData7.txt' using x:y2:y1:y5:y4 with candlesticks whiskerbars lt -1 title "", '' using x:y3 with linespoints title "" pt 5 lt -1
#unset ytics

set format y ""
set ylabel ""
set xlabel "MinorX-2"
plot '/path/to/file/GraphData8.txt' using x:y2:y1:y5:y4 with candlesticks whiskerbars lt -1 title "", '' using x:y3 with linespoints title "" pt 5 lt -1

set xlabel "MinorX-3"
plot '/path/to/file/GraphData9.txt' using x:y2:y1:y5:y4 with candlesticks whiskerbars lt -1 title "", '' using x:y3 with linespoints title "" pt 5 lt -1

set xlabel ""

unset xtics

unset multiplot

set output

set terminal wxt

No comments:

Post a Comment