How can I increase the key symbol for filledcurves plot style? - gnuplot

I would like to increase the key symbol for filledcurves plot style. I can control the length using set key samplen <value> but not the height for it. I can reach the result wanted but the used way is cumbersome and depends both size plot and font used.
I used datafile.dat file
1 1270 834
2 1112 900
3 794 982
4 656 710
and this code
reset
set encoding utf8
set terminal pngcairo size 500,500 font "Segoe UI,10"
set output "boxes.png"
set key title "{/:Bold Auto key}" Left reverse samplen 2
set tics out nomirror
set xrange [0:5]
unset xtics
set palette defined (\
1 "dark-violet",\
2 "#009e73",\
3 "#56b4e9",\
4 "#e69f00"\
)
unset colorbox
set errorbars small
set macros
style = "solid 0.5 border lt -1"
set style fill #style
# -----------------------------------------------
posX = 0.55 # x position (at screen)
posY = 0.9 # y position (at screen)
shiftY = 0.035 # shift in y direction (from up to down)
sizeX = 0.020 # box width
sizeY = 0.012 # box height
set label "{/:Bold Manual key}" at screen posX, posY left offset 0,1.2
set obj rect center screen posX,posY-0*shiftY size screen 2*sizeX,2*sizeY fc ls 1 fs #style
set obj rect center screen posX,posY-1*shiftY size screen 2*sizeX,2*sizeY fc ls 2 fs #style
set obj rect center screen posX,posY-2*shiftY size screen 2*sizeX,2*sizeY fc ls 3 fs #style
set obj rect center screen posX,posY-3*shiftY size screen 2*sizeX,2*sizeY fc ls 4 fs #style
set arrow from screen posX-sizeX, posY-4*shiftY to screen posX+sizeX, posY-4*shiftY lw 3 nohead
set label "Method 1" at screen posX, posY-0*shiftY left offset 2,0.05
set label "Method 2" at screen posX, posY-1*shiftY left offset 2,0.05
set label "Method 3" at screen posX, posY-2*shiftY left offset 2,0.05
set label "Method 4" at screen posX, posY-3*shiftY left offset 2,0.05
set label "Reference" at screen posX, posY-4*shiftY left offset 2,0.05
# -----------------------------------------------
plot \
keyentry w filledcurves ls 1 title "Method 1",\
keyentry w filledcurves ls 2 title "Method 2",\
keyentry w filledcurves ls 3 title "Method 3",\
keyentry w filledcurves ls 4 title "Method 4",\
"datafile.dat" u 1:2:0 w boxes lc palette notitle,\
"" u 1:3:(0.5) w xerrorbars ls -1 pt -1 lw 3 title "Reference"
to do this plot
Is there another way to do this?

Is there another way? Yes, but it's a bit ugly. The height of the key sample is determined by the font size used for the key titles. You can abuse this by setting the key to use a large font and then overriding it for the actual text of each plot title.
The following example sets the key font to 20 point and uses enhanced text mode to reduce the size back to 10 point when composing the title text. You can ignore the complicated using and every bits, it's just a way of generating some fake data to plot.
set term pngcairo size 500,500 font "ArnoPro,10"
set output "boxes.png"
$DATA << EOD
5
2
4
3
1
EOD
set yrange [0:6]
set style fill solid 1.0 border lc "black"
set boxwidth 0.3
set key font "ArnoPro,20" enhanced
plot for [i=1:5] $DATA every ::(i-1)::(i-1) using (i):(column(1)) with boxes \
title sprintf("{/ArnoPro=10 Method %d}", i)

Based on the solution from #Ethan, you could also plot very thick dummy lines out of the range or with NaN.
plot for [i=1:5] NaN w l lw 13 lt i ti sprintf(" Method %d",i)
Code:
### enlarge height of key sample
reset session
$DATA << EOD
5
2
4
3
1
EOD
set yrange [0:6]
set style fill solid 1.0 border lc "black"
set boxwidth 0.3
set key samplen 2 reverse
plot for [i=1:5] $DATA every ::(i-1)::(i-1) using (i):(column(1)) with boxes \
title sprintf("Method %d", i), \
for [i=1:5] NaN w l lw 13 lt i ti sprintf(" Method %d",i)
### end of code
Result:

Related

Shifting of axis title and sub-title in Gnuplot histogram

Mr data file is
# test.dat
# Sample No. Phenol Red Neutral Red Bromophenol Blue Bromocresol Green Mixed Indicator
1 80 69 223 222 130
2 89 62 321 267 160
3 92 67 248 276 147
Gnuplot code is
#
#
###
reset session
###
set terminal postscript eps enhanced colour font 'Times-Roman,12' size 6in,4in
set output "test.eps"
#------------------------------------------------------------------------------
set style line 1 lt 4 lw 1 lc rgb "#4169E1"
set style line 2 lt 4 lw 1 lc rgb "#2E8B57"
set style line 3 lt 5 lw 1 lc rgb "#FF4500"
set style line 4 lt 4 lw 1 lc rgb "#FAD02C"
set style line 5 lt 4 lw 1 lc rgb "#FF0080"
#------------------------------------------------------------------------------
set xtics out scale 1.5
set ytics out scale 1.5
set ytics nomirror
set yrange [0:350]
set key off
set tics font ", 16"
set xlabel "Sample No. " font ",16"
set ylabel "Moisture Content ({/Symbol \155}g of H_{2}O/g of melt)" font ",16"
set key samplen 2 spacing 1.65 font ",14" width -1.0
set key inside left horizontal
set style fill solid border
set style histogram clustered gap 1 title textcolor lt -1
# ----------------------------------------
set rmargin screen 0.9
set lmargin screen 0.1
set bmargin screen 0.4
# ----------------------------------------
set style data histogram
plot \
newhistogram "Direct titration", \
'test.dat' using 2:xtic(1) ls 4 axes x1y1 title "Phenol Red", \
'' u 3 ls 5 axes x1y1 title "Neutral Red", \
newhistogram "Back-titration", \
'test.dat.dat' using 4:xtic(1) ls 1 axes x1y1 title "Bromophenol Blue", \
'' u 5 ls 2 axes x1y1 title "Bromocresol Green", \
'' u 6 ls 3 axes x1y1 title "Mixed Indicator"
# ----------------------------------------
##
Script works fine. I would like to provide more spacing between the tick labels (1,2,3) and the sub-title (Direct titration and Back-titration) as well as spacing between the sub-titles and axis title. How can it be done?
set xlabel offset 0, -1 will shift both the subtitles and the axis title downward by one character height.
set xlabel "\nTEXT" will create a two-line axis label and place TEXT on the second line.
Modifying your xlabel command to be
set xlabel "\nSample No. " font ",16" offset 0,-1
will make both those changes.

Polar plot in gnuplot

I have a problem. Im trying to do a polar plot, the fact it's that i want to plot some theorical line as some experimental data in the plot. But the theorical line has a range different of the experimental data because i had to do it like that to had gnuplot paint it.
I have the following script:
####
reset
set encoding utf8
set size 1,1
set terminal epslatex
set output "direccionalidad.tex"
unset border
set polar
set angles degrees #set gnuplot on degrees instead of radians
set style line 10 lt 1 lc 0 lw 0.3
set grid polar 30 #set the grid to be displayed every 60 degrees
set grid ls 10
set trange[-90:90]
f(t)=27.934*sin(1.81651*t+96.1991) # Theorical line
set xrange[-31:32]
set yrange[-30:30]
set xtics axis #disply the xtics on the axis instead of on the border
set ytics axis
set xtics scale 0 #"remove" the tics so that only the y tics are displayedj
set ytics (0, 6, 12) #make the ytics go from the center (0) to 6000 with incrment of 1000
unset ytics
set xtics ("5" 6, "15" 16.5, "30" 32)
# set the xtics only go from 0 to 6000 with increment of1000 but do not display anything. This has to be done otherwise the grid will not be displayed correctly.
set rtics (5,15,30)
set rtics format ' ' scale 0
set_label(x, text) = sprintf("set label '%s' at (32*cos(%f)), (32*sin(%f)) center", text, x, x) #this places a label on the outside
eval set_label(0, "0")
eval set_label(30, "30")
eval set_label(60, "60")
eval set_label(90, "90")
eval set_label(120, "120")
eval set_label(150, "150")
eval set_label(180, "180")
eval set_label(-150, "-150")
eval set_label(-120, "-120")
eval set_label(-90, "-90")
eval set_label(-60, "-60")
eval set_label(-30, "-30")
set size square
#PLOTS
plot "direccionalidaddatos.txt" u 1:3 pointtype 7 ps 2 lt 1 lw 3 lc rgb 'blue' notitle ,\
f(t) dt '-' lc rgb 'blue' notitle
#ACABAMOS
###
And here there are some examples of columns in the direccionalidaddatos.txt archive, the column in the middle it's just the angle in radians but it's usless cause i just want the angle in degrees so just ignore it ;):
-90 -1.570796327 0.1
-85 -1.483529864 0.2
-80 -1.396263402 0.4
-75 -1.308996939 0.7
-70 -1.221730476 1.1
-65 -1.134464014 1.7
-60 -1.047197551 2.5
#
And the result it is the image Polar plot
As you see in the image there are two branches that have no points, i want those branches to simply don't disappear cause they don't mean notihng in the graphic.So if anyone knows a form to made dissapear the branches, or to improve the script let me know hehe.
Thanks so much.
Can you just reduce the sampled range for the second plot component?
plot "direccionalidaddatos.txt" u 1:3 pointtype 7 ps 2 lt 1 lw 3 lc rgb 'blue' notitle ,\
[-52:45] '+' using 1:(f($1)) with lines dt '-' lc rgb 'blue' notitle

Plot a error bar as shaded region in GNUPLOT

I have plotted a graph (X-top axis, Y-bottom axis) with fsteps function in Gnuplot. Next, I tried to add an error bar as a shaded region(transparent) to the graph, but unable to plot it on the graph. Below is the code so far I have tried and also attached the graph.
#!/usr/bin/gnuplot
reset
set border lw 30
set term pngcairo size 10000,10000 font "arial-Bold,130"
set output 'out.png'
unset key
set size ratio 1.2
set style data lines
set xtics format ""
set x2tics nomirror
set ytics out nomirror
set ytics 0,20
set x2label "Vs (km/s)" offset -1.0
set ylabel 'Depth (km)' offset 1.5
set xrange [2.5:4.8]
set yrange [314:0]
set label 3 at 2,120
set key samplen 1.7 at 3.0,135
#
set label 1 '(a)' font "arial-Bold,130" at 0.8,15 right
set label 3 "C3 (MNAI)" center font "arial-Bold,130"
set style fill transparent solid 0.25
set style fill noborder
plot 'MAN.inmd' lc rgb 'blue' lw 35 title "Initial model" with fsteps,\
'MAN.outmd' using 1:2 lc rgb 'red' lw 35 dt"-" title "Inverted model" with fsteps ,\
'MAN.outmd' using 1:($2-$3):($2+$3) with filledcurve lc "blue" notitle,
Example Data for file MAN.outmd X Y Z(Error)
0 3 0
0.4475 3.1 0
0.4475 3.5 0
2.6738 3.6 0.0552
2.6738 5 0.0552
3.8441 5.1 0.0592
3.8441 8 0.0592
3.6302 8.1 0.0395
3.6302 15.935 0.0395
4.5176 15.1 0.041
4.5176 113.296 0.041
4.2443 113.3 0.1024
4.2443 214 0.1024
4.4584 214.1 0.1077
4.4584 314 0.1077
I want output should be as given below (example)
gnuplot can easily fill the area between two "horizontal" curves (i.e. unique x-values), but as far as I know, not between two vertical curves. However, gnuplot can fill some enclosed areas. So, the workaround is to create datapoints which surround the area to be shaded. For this, you "plot" the data into a datablock, once "forward" with x-dx and once "backwards" with x+dx. This can be done easiest if you have the data already in a datablock, because then you can easily loop the data forward and backwards. In case you have your data in a file, see here: gnuplot: load datafile 1:1 into datablock
Code:
### fill between vertical curves
reset session
$Data <<EOD
0 3 0
0.4475 3.1 0
0.4475 3.5 0
2.6738 3.6 0.0552
2.6738 5 0.0552
3.8441 5.1 0.0592
3.8441 8 0.0592
3.6302 8.1 0.0395
3.6302 15.935 0.0395
4.5176 15.1 0.041
4.5176 113.296 0.041
4.2443 113.3 0.1024
4.2443 214 0.1024
4.4584 214.1 0.1077
4.4584 314 0.1077
EOD
# create datablock with circumference of shaded area
set print $XErrorFill
do for [i=1:|$Data|] {
print real(word($Data[i],1))-real(word($Data[i],3)), real(word($Data[i],2))
}
do for [i=|$Data|:1:-1] {
print real(word($Data[i],1))+real(word($Data[i],3)), real(word($Data[i],2))
}
set print
set yrange [:] reverse
set style fill noborder
plot $XErrorFill u 1:2 w filledcurves lc "light-grey" notitle, \
$Data u 1:2 w l lw 1.5 lc rgb "red" notitle
### end of code
Result:

Equal frame size in a multiplot 3x4

I have the following multiplot
set encoding iso_8859_1
set xtics font "Helvetica,16"
set ytics font "Helvetica,16"
set terminal postscript eps enhanced color size 12in,6in
set grid
set key box vertical width 2 height 0.75 maxcols 1 #spacing 1
load "../estilos.txt"
# TMARGIN = "set tmargin at screen 0.90; set bmargin at screen 0.55"
# BMARGIN = "set tmargin at screen 0.55; set bmargin at screen 0.20"
# LMARGIN = "set lmargin at screen 0.15; set rmargin at screen 0.55"
# RMARGIN = "set lmargin at screen 0.55; set rmargin at screen 0.95"
############################################################################################
set output "_Mult_16R_4Chk_mp.eps"
set title "Minimum number of contention intervals, {/Symbol D}=1" font "Helvetica,17"
set multiplot layout 3,4 columnsfirst
set xlabel ""
set ylabel "T [s]" font "Helvetica,19"
set key top left font "Helvetica,16"
# #TMARGIN #LMARGIN
plot [0:40][0:140] "contention_1/sys-time-4-16-80-15-2.txt" u ($1/60):2 every 2 ls 20 ps 0.35 title "MSL=80%"
set title ""
set key top left font "Helvetica,16"
set ylabel "Queue length [batches]" font "Helvetica,19"
# #BMARGIN; #LMARGIN
plot [0:40][0:70] "contention_1/queue-length-4-16-50-15-1.txt" using ($1/60):2 every 2 with lines ls 20 lw 1.5 title "MSL=50%" ,\
"contention_1/queue-length-4-16-80-15-2.txt" using ($1/60):2 every 2 with lines ls 2200 lw 1.5 title "MSL=80%" ,\
"contention_1/queue-length-4-16-98-15-3.txt" using ($1/60):2 every 2 with lines ls 5550 lw 1.5 title "MSL=98%"
set key bottom right font "Helvetica,16"
set ylabel "Inventory ratio, {/Symbol g}" font "Helvetica,19"
set xlabel "Operation time [minutes]" font "Helvetica,19"
# #BMARGIN; #LMARGIN
plot [0:40][0:1] "contention_1/known-ratio-4-16-50-15-1.txt" using ($1/60):2 every 2 w linespoints ls 20 ps 0.75 lw 1.5 title "MSL=50%" ,\
"contention_1/known-ratio-4-16-80-15-2.txt" using ($1/60):2 every 2 w linespoints ls 2200 ps 0.75 lw 1.5 title "MSL=80%" ,\
"contention_1/known-ratio-4-16-98-15-3.txt" using ($1/60):2 every 2 w linespoints ls 5550 ps 0.75 lw 1.5 title "MSL=98%"
############################################################################################
set title "Minimum number of contention intervals, {/Symbol D}=100" font "Helvetica,17"
set xlabel ""
set ylabel ""
set key top left font "Helvetica,16"
plot [0:40][0:140] "contention_100/sys-time-4-16-80-15-2.txt" u ($1/60):2 every 2 ls 20 ps 0.35 title "MSL=80%"
set title ""
set key top left font "Helvetica,16"
plot [0:40][0:70] "contention_100/queue-length-4-16-50-15-1.txt" using ($1/60):2 every 2 with lines ls 20 lw 1.5 title "MSL=50%" ,\
"contention_100/queue-length-4-16-80-15-2.txt" using ($1/60):2 every 2 with lines ls 2200 lw 1.5 title "MSL=80%" ,\
"contention_100/queue-length-4-16-98-15-3.txt" using ($1/60):2 every 2 with lines ls 5550 lw 1.5 title "MSL=98%"
set key bottom right font "Helvetica,16"
set xlabel "Operation time [minutes]" font "Helvetica,19"
plot [0:40][0:1] "contention_100/known-ratio-4-16-50-15-1.txt" using ($1/60):2 every 2 w linespoints ls 20 ps 0.75 lw 1.5 title "MSL=50%" ,\
"contention_100/known-ratio-4-16-80-15-2.txt" using ($1/60):2 every 2 w linespoints ls 2200 ps 0.75 lw 1.5 title "MSL=80%" ,\
"contention_100/known-ratio-4-16-98-15-3.txt" using ($1/60):2 every 2 w linespoints ls 5550 ps 0.75 lw 1.5 title "MSL=98%"
############################################################################################
set title "Minimum number of contention intervals, {/Symbol D}=200" font "Helvetica,17"
set xlabel ""
set ylabel ""
set key top left font "Helvetica,16"
plot [0:40][0:140] "contention_200/sys-time-4-16-80-15-2.txt" u ($1/60):2 every 2 ls 20 ps 0.35 title "MSL=80%"
set title ""
set key top left font "Helvetica,16"
plot [0:40][0:70] "contention_200/queue-length-4-16-50-15-1.txt" using ($1/60):2 every 2 with lines ls 20 lw 1.5 title "MSL=50%" ,\
"contention_200/queue-length-4-16-80-15-2.txt" using ($1/60):2 every 2 with lines ls 2200 lw 1.5 title "MSL=80%" ,\
"contention_200/queue-length-4-16-98-15-3.txt" using ($1/60):2 every 2 with lines ls 5550 lw 1.5 title "MSL=98%"
set key bottom right font "Helvetica,16"
set xlabel "Operation time [minutes]" font "Helvetica,19"
plot [0:40][0:1] "contention_200/known-ratio-4-16-50-15-1.txt" using ($1/60):2 every 2 w linespoints ls 20 ps 0.75 lw 1.5 title "MSL=50%" ,\
"contention_200/known-ratio-4-16-80-15-2.txt" using ($1/60):2 every 2 w linespoints ls 2200 ps 0.75 lw 1.5 title "MSL=80%" ,\
"contention_200/known-ratio-4-16-98-15-3.txt" using ($1/60):2 every 2 w linespoints ls 5550 ps 0.75 lw 1.5 title "MSL=98%"
############################################################################################
set title "Minimum number of contention intervals, {/Symbol D}=300" font "Helvetica,17"
set xlabel ""
set ylabel ""
# set ylabel "T [s]" font "Helvetica,19"
set key top left font "Helvetica,16"
plot [0:40][0:140] "contention_300/sys-time-4-16-80-15-300-2.txt" u ($1/60):2 every 2 ls 20 ps 0.35 title "MSL=80%"
set title ""
set key top left font "Helvetica,16"
plot [0:40][0:70] "contention_300/queue-length-4-16-50-15-300-1.txt" using ($1/60):2 every 2 with lines ls 20 lw 1.5 title "MSL=50%" ,\
"contention_300/queue-length-4-16-80-15-300-2.txt" using ($1/60):2 every 2 with lines ls 2200 lw 1.5 title "MSL=80%" ,\
"contention_300/queue-length-4-16-98-15-300-3.txt" using ($1/60):2 every 2 with lines ls 5550 lw 1.5 title "MSL=98%"
set key bottom right font "Helvetica,16"
set xlabel "Operation time [minutes]" font "Helvetica,19"
plot [0:40][0:1] "contention_300/known-ratio-4-16-50-15-300-1.txt" using ($1/60):2 every 2 w linespoints ls 20 ps 0.75 lw 1.5 title "MSL=50%" ,\
"contention_300/known-ratio-4-16-80-15-300-2.txt" using ($1/60):2 every 2 w linespoints ls 2200 ps 0.75 lw 1.5 title "MSL=80%" ,\
"contention_300/known-ratio-4-16-98-15-300-3.txt" using ($1/60):2 every 2 w linespoints ls 5550 ps 0.75 lw 1.5 title "MSL=98%"
unset multiplot
The data files are linked here.
The plot looks like this:
which has the information I want to show.
However, the frames are not equal in size. For example, the first row is shorter because it has titles, the middle row of plots is bigger, and the bottom row is also small. The widths of single plots are differents too.
I have seen in this post of Gnuplotting Multiplot – placing graphs next to each other that using set l/b/r/tmargin at screen value is the way to set the sizes of the frames in a multiplot 2x2, but in my case multiplot 3x4 and with tics and separation between single plots result more difficult to achieve.
To my opinion, you probably should forget about set multiplot layout 3,4. Instead, set the sizes and origins of the plots yourself and insert the titles and xlabels as labels at the top and at the bottom. Then use a few parameters to tune your layout. If the code might not be self-explaining enough do not hesitate to ask.
Code:
### customized multiplot
reset session
# Parameters to tune
PlotRows = 3
PlotCols = 4
TitlePosY = 0.98
MultiPlotTop = 0.93
SizeScalingX = 0.90
SizeScalingY = 0.95
MultiPlotBottom = 0.05
XLabelPosY = 0.03
MultiPlotLeft = 0.07
YLabelPosX = 0.02
set lmargin 2
# define origin functions
PlotGridX = (1-MultiPlotLeft)/PlotCols
PlotOriginX(n) = ((n-1)%PlotCols)*PlotGridX + MultiPlotLeft
PlotGridY = (MultiPlotTop-MultiPlotBottom)/PlotRows
PlotOriginY(n) = (PlotRows-1-int((n-1)/PlotCols))*PlotGridY + MultiPlotBottom
# set size
set size SizeScalingX*(1-MultiPlotLeft)/PlotCols, SizeScalingY*(MultiPlotTop+MultiPlotBottom)/PlotRows
# set your titles and labels
TitleStd = "Minimum number of \ncontention intervals, {/Symbol D}="
TitleVar = "1 100 200 300"
XLabelStd = "Operation time [minutes]"
do for [i=1:PlotCols] {
set label i at screen PlotOriginX(i), screen TitlePosY TitleStd.word(TitleVar,i) font "Helvetica,8"
set label i+10 at screen PlotOriginX(i), screen XLabelPosY XLabelStd font "Helvetica,8"
}
YLabels = '"T [s]" "Queue length [batches]" "Inventory ratio, {/Symbol g}"'
do for [i=1:PlotRows] {
set label i+20 at screen YLabelPosX, screen PlotOriginY(i*PlotCols)+PlotGridY*0.5 word(YLabels,i) rotate by 90 center
}
set multiplot
do for [i=1:12] { # do your 3x4 plots here and increase "counter" i after each plot
set origin PlotOriginX(i), PlotOriginY(i)
plot 10**((i-1)/4)*sin(0.1*i*x) notitle
}
unset multiplot
### end of code
Result:

shorten the distance in between plots in multiplot

I have to plot a multiplot comprising two columns and five rows. I have plotted that but I find the distance in between the plots are big and I want to reduce them. I used the last sample coding (template) as in the website ( http://www.gnuplot.info/demo_canvas/layout.html ). I tried to adjust the top and bottom margin parameters. If I use smaller values the label for x-axis disappears and the distance between plots shortened. So I have to use big values. I just wonder is there any other way to bring the plot nearer to each other? I have given the coding for plot below for your view.
I would be glad to get some insights on this issue.
Thanks in advance
#!/usr/bin/gnuplot
# SET TERMINAL
set terminal postscript color enhanced "Arial" 10 #dashed lw 1 "Helvetica" 14
set output "plot-distribution-isoMalto-thermo.ps"
# SET MACRO
set macro
labelFONT="font 'Arial,20'"
scaleFONT="font 'Arial,14'"
graph="using 1:2"
axislabelFONT="font 'Arial,18' "
#main_titleFONT="font 'times,14'"
graphLabel="at 120,9000 font 'Arial,20' "
position_orienation="at -50,18000 rotate right"
color="linecolor rgb 'black' "
layer1=" w l lt 1 lw 3 lc rgb 'black'"
layer3=" w l lt 3 lw 3 lc rgb 'red' "
layer2=" w l lt 2 lw 3 lc rgb 'green'"
layer4=" w l lt 4 lw 3 lc rgb 'blue'"
# SET MARGINS
set tmargin 0.5
set bmargin 4.0
set lmargin 15
set rmargin 3
# SET RANGE
set xrange [0:180]
set yrange [0:12000]
set xtics nomirror 0, 60, 180 #scaleFONT
set ytics 0, 3000, 12000 #scaleFONT
set format x ""
# MULTIPLOT START
set multiplot layout 5, 2 #title "Multiplot layout 5, 2"
set nokey
# PLOTTING STARTS
#plot1
#set title "Plot 1"
set xtics nomirror
set label 1 "(a)" #graphLabel
plot "angle_output-thermo-malto-L1.dat" #layer1,\
"angle_output-thermo-malto-L3.dat" #layer3
#plot2
#set title "Plot 2"
set label 1 "(b)" #graphLabel
plot "angle_output-thermo-malto-L2.dat" #layer2 ,\
"angle_output-thermo-malto-L4.dat" #layer4
#plot3
#set title "Plot 3"
set label 1 "(c)" #graphLabel
plot "angle_output-thermo-bcmChain1-L1.dat" #layer1 ,\
"angle_output-thermo-bcmChain1-L3.dat" #layer3
#plot4
#set title "Plot 4"
set label 1 "(d)" #graphLabel
plot "angle_output-thermo-bcmChain1-L2.dat" #layer2 ,\
"angle_output-thermo-bcmChain1-L4.dat" #layer4
#plot5
#set title "Plot 5"
set label 1 "(e)" #graphLabel
set label 2 "Distribution / N" #position_orienation #labelFONT
plot "angle_output-thermo-bcmChain2-L1.dat" #layer1 ,\
"angle_output-thermo-bcmChain2-L3.dat" #layer3
#plot6
#set title "Plot 6"
set nolabel
set label 1 "(f)" #graphLabel
plot "angle_output-thermo-bcmChain2-L2.dat" #layer2 ,\
"angle_output-thermo-bcmChain2-L4.dat" #layer4
#plot7
#set title "Plot 7"
set label 1 "(g)" #graphLabel
plot "angle_output-thermo-cello-L1.dat" #layer1 ,\
"angle_output-thermo-cello-L3.dat" #layer3
#plot8
#set title "Plot 8"
set label 1 "(h)" #graphLabel
plot "angle_output-thermo-cello-L2.dat" #layer2 ,\
"angle_output-thermo-cello-L4.dat" #layer4
# for plot 9 and 10
unset yrange
set yrange [0:16000]
set ytics 0, 4000, 16000
set key
#plot9
#set title "Plot 9"
set label 1 "(i)" #graphLabel
set format x
plot "angle_output-thermo-isomalto-L1.dat" #layer1 title "layer1",\
"angle_output-thermo-isomalto-L3.dat" #layer3 title "layer3"
#plot10
#set title "Plot 10"
set label 1 "(j)" #graphLabel
set label "Angle in {/Symbol q} / deg" at -90,-8500 #labelFONT
set format x
plot "angle_output-thermo-isomalto-L2.dat" #layer2 title "layer2",\
"angle_output-thermo-isomalto-L4.dat" #layer4 title "layer4"
# END MULTIPLOT
unset multiplot
#reset
#pause -1
I know this is an old question, but it might be possible to do something with set size to increase the size of each plot (optionally, a set origin for each plot might be necessary). Otherwise, your best bet is to use set lmargin,set rmargin, set bmargin and set tmargin.
You can use set ?margin at ... to set the margin relative to screen coordinates (as opposed to character coordinates in the form you have put it. This will allow you to place the plots exactly where you want to. see http://gnuplot.sourceforge.net/demo/margins.html

Resources