I want to draw a rowstacked histogram. The following is what I have so far .
I have used the code below
reset
set bmargin 10
set lmargin 20
set rmargin 16
set tmargin 7
show margin
set title "" font "Verdana,27"
show title
set grid
set xlabel offset 0,-5 font "Verdana,25"
set xlabel "Number of Cores"
show xlabel
set xtics font "Verdana,18"
set ylabel offset -4,0 font "Verdana,25"
set ylabel "Time (%)"
show ylabel
set yrange [0:130]
set ytics font "Verdana,18"
set ytics (0, 10, 20, 30, 40, 50, 60, 70, 80, 90, 100)
set style data histogram
set style histogram rowstacked title offset 0,3
set style fill solid border lt -1
set boxwidth 0.9
set key right
set key font "Verdana,17"
set key autotitle columnheader horizontal
plot newhistogram '{/=22 1-Core}', \
for [i=2:5] 'base_vs_FHA_speedup_1core.dat' using i:xtic(1), \
newhistogram '{/=22 2-Cores}' lt 1, \
for [i=2:5] 'base_vs_FHA_speedup_2core.dat' using i:xtic(1) notitle, \
newhistogram '{/=22 4-Cores}' lt 1, \
for [i=2:5] 'base_vs_FHA_speedup_4core.dat' using i:xtic(1) notitle, \
newhistogram '{/=22 8-Cores}' lt 1, \
for [i=2:5] 'base_vs_FHA_speedup_8core.dat' using i:xtic(1) notitle
I have 4 different data files with sample data like this
base_vs_FHA_1core.dat
Configuration col1 col2 col3 col4 col5
Base 5 50 40.5 4.5
FHA 5 16 38 5 1.54x
base_vs_FHA_2core.dat
Base 9.3 47 37.3 6.3
FHA 9.3 15 34.3 6.3 1.54x
base_vs_FHA_4core.dat
Base 18 41 33.9 7.06
FHA 16.6 13.07 30.7 7.4 1.47x
base_vs_FHA_8core.dat
Base 27.7 34.3 28.3 9.6
FHA 28.3 11.45 25.3 9.6 1.34x
I want to have each bar in the histogram labeled with the corresponding value and the value of the last column on the top of the second histogram in each pair. How can I achieve this?
Can I merge all the 4 files and achieve the same goal?