# How to add additional space for the last group of bars in gnuplot?

I used this:

plot 'dat' u 2:xtic(1) t 'pca-10', \
'dat' u 3 t 'pca-20', \
'dat' u 4 t 'pca-30', \
'dat' u 4 t 'pca-30'


my data is:

antlr   0.9424  0.9363  0.7754  0.7506
bloat   0.9623  0.9357  0.8704  0.7807
eclipse 0.7874  0.7958  0.3617  0.3903
fop    0.8866  0.8720  0.6590  0.6146
luindex 0.9028  0.9031  0.5168  0.5847
average 0.8950  0.8926  0.6185  0.6332


The last row is the average. How can I add additional space just before the average group of bars, so that it would be more visible?

-
Your question is in danger of being closed, as it does not appear to relate to TeX and friends. If it does get closed, you might edit it and it can be re-opened :) – cmhughes Jul 29 '14 at 18:58

I'm not sure how to do that with gnuplot, but here's a way to do it with PGFPlots directly within TeX. You can offset the last set of bars using a coordinate filter that conditionally adds some space to the fifth set of coordinates:

\documentclass{article}
\usepackage{filecontents}
\usepackage{pgfplots}

\begin{filecontents}{data.dat}
name    a   b   c   D
antlr   0.9424  0.9363  0.7754  0.7506
bloat   0.9623  0.9357  0.8704  0.7807
eclipse 0.7874  0.7958  0.3617  0.3903
fop    0.8866  0.8720  0.6590  0.6146
luindex 0.9028  0.9031  0.5168  0.5847
average 0.8950  0.8926  0.6185  0.6332
\end{filecontents}

\begin{document}

\begin{tikzpicture}
\begin{axis}[
ybar,
ymin=0,
bar width=0.2cm,
enlarge x limits=0.15,
width=12cm, height=5cm,
x filter/.code={\pgfmathparse{#1+(#1==5)*0.5}},
xtick=data,
xticklabels from table={data.dat}{name},
xticklabel style={text height=2ex}
]