Labels overlap in gnuplot
Having a data file I want to add labels to my bar plot, but unfortunately the labels overlay above the first bar and I could not figure out how to add an offset to each label:
set xrange[0:30]
set y2tics font "Arial,8" mirror
#set y2tics rotate # rotating the y2ticks alongside with the y-axis
set xtics font "Arial,6"
#set datafile separator "\t"
set boxwidth 0.5 absolute # balkengroesse
set bmargin 0.6
set tmargin 0
set lmargin 0.9
set rmargin 0
set title "RTF History Analysis" font"Arial,9"
set ylabel "Max RTF" font"Arial,9" noenhanced
#set xlabel "Timestamp" font"Arial,9" noenhanced
#set xtics rotate 90 # turn the text to the vertical position
set style data boxes # boxplot
set style fill solid 0.5 noborder
set multiplot layout 3,1 # 3x vertical 1x horizontal
set grid xtics y2tics
set logscale y
set grid my2tics
set yrange[0.001:6500]
set logscale y2
set my2tics 10
unset ytics
set format "10^{%L}"
set xtics rotate by 50 offset -4.5,-3.00
set format y
plot "history_file.txt" u 7:xticlabels(2) w boxes lc rgb"blue" notitle, \
"history_file.txt" u 7:2:3 w labels rotate left font "Arial,6" lc rgb"blue" notitle
Part of data file:
recipe.rcp 14-03-2017-12:10 top 0.00656997498323 0.0074438616489 rx 0.00791297772894
recipe.rcp 14-03-2017-15:55 cibasic 0.00665396222124 0.00770821200216 tx 0.00938002006172
recipe.rcp 14-03-2017-16:27 cibasic 0.00654659192121 0.00791088142395 tx/tx_ 0.010395539525
recipe.rcp 15-03-2017-14:44 ci 0.0106795993772 0.0114679721169 top 0.0128018372288
recipe.rcp 15-03-2017-14:58 sens 0.0101868323628 0.011261329309 tx 0.0131594769347
Try
plot 'data' u 7:xticlabels(2) w boxes, '' u (column(0)):(.5):3 with labels
to place the labels with the boxes, all at the same height (y = 0.5).
To have the labels follow the box height, try
plot 'data' u 7:xticlabels(2) w boxes, '' u (column(0)):(0.01 +$7):3 with labels