Q:

Error bars offset in multiplot

data.txt
test1   10  1

test2   10  2

test3   12  3

.plt file
set terminal postscript eps solid color enhanced "Helvetica" 20
set output "io1.eps"
set size 1,1
set multiplot layout 1,2
set style histogram errorbars gap 1 lw 1 title textcolor lt -1
set style data histograms

set lmargin at screen 0.1; set rmargin at screen 0.45
set xrange [-0.5:1.5]
set yrange [0:15]
plot './data.txt' every :::0::0 using 2:3 title "aaa" fc rgb "#00ff00" fs pattern 9

set lmargin at screen 0.55; set rmargin at screen 0.9
set xrange [-0.5:1.5]
set yrange [0:15]
plot './data.txt' every :::1::1 using 2:3 title "bbb" fc rgb "#f0f000" fs pattern 3 

unset multiplot

results

Problem
There is a gap between the average-value column and the error bar in the second subfigure, how to fix it?

A:

I do not fully explanation why this happens. It seems that gnuplot implicitly uses the record index within the current dataset. This index is reset when two blank lines start a new data set.
Maybe you can change your data file by using 2 empty lines between the data lines instead of only one. Then you can access the data with index instead of every like this:
Replace the two plot commands
plot './data.txt' every :::0::0 using 2:3 title "aaa" fc rgb "#00ff00" fs pattern 9
plot './data.txt' every :::1::1 using 2:3 title "bbb" fc rgb "#f0f000" fs pattern 3

by 
plot './data.txt' index 0 using 2:3 title "aaa" fc rgb "#00ff00" fs pattern 9
plot './data.txt' index 1 using 2:3 title "bbb" fc rgb "#f0f000" fs pattern 3

Now it works: 

