I have a histogram consisiting in 6 columns. I would like to clustered them in pairs to have two clustered group made of two stacked colums. I almost done it, except that the legend is has double the entries that I want and that the graph is not centered
set terminal epslatex standalone color size 4.0in,3.0in background rgb "white"
set output 'massFlowSection.tex'
set xtics("ex1" 1, "ex2" 2, "ex3" 3)
#set yrange [0:100]
set style fill solid border -1
#set key invert
#set grid
num_of_ksptypes=2
set boxwidth 0.5/num_of_ksptypes
dx=0.5/num_of_ksptypes
offset=-0.12
plot 'data1.dat' using ($1+offset):($2+$3+$4) title "par3" with boxes, \
'' using ($1+offset):($3+$4) title "par2" with boxes, \
'' using ($1+offset):($4) title "par1" with boxes, \
'data2.dat' using ($1+offset+dx):($2+$3+$4) title "par3" with boxes, \
'' using ($1+offset+dx):($2+$3) title "par2" with boxes, \
'' using ($1+offset+dx):($4) title "par1" with boxes
The entry data are file data1.dat
area par3 par2 par1
1 0.0078 0.0211 0
2 0.0139 0.0302 0
3 0.0169 0 0.119
and file data2.dat
nr par3 par2 par1
1 0.0083 0.0233 0
2 0.0151 0.0302 0
3 0.0173 0 0.211
This is the result
to clustered them in pairs to have two clustered group made of two stacked colums
- I don't understand that. Can you draw for example how should it look like? Or find an example online how it should look like? For the data provided, at best? – KamilCuk Dec 2 '19 at 21:56