The numbers won't fit inside the bar with very small values (the red columns in your first example), so it's generally safer to keep them above. If you do want to place them inside the bars, you can set every node near coord/.append style={anchor=north}
, which will use the top of the label nodes (the north
anchor) for the placement. You can rotate the labels by adding the option rotate=90, anchor=east
(to place them inside the columns) or anchor=west
to place them on top.
For column charts like this, I would recommend setting ymin=0
to make sure that the columns start at 0
, and enlarge y limits={upper, value=<value>}
to only add space at the top of the plot.
For making the plots a bit more graphically appealing, there are a number of things you can do. For one, I would order the columns from smallest to largest. Based on How to minimize the ink-to-data ratio for pgfplots, here's a more reduced version of your chart. I've also increased the space between the legend entries as explained in How can I adjust the horizontal spacing between legend entries in PGFPlots?.

\documentclass{standalone}
\usepackage{pgfplots}
\begin{document}
\begin{tikzpicture}
\begin{axis}[
compat=newest, %Better label placement
ybar = 0.6,
width=1.2\textwidth,
height=0.4\textheight,
enlarge y limits={upper, value=0.2},
ymin=0,
enlarge x limits = 0.2,
bar width=32pt,
title={Instance els19 with 1\% max error},
legend style={at={(0.5,-0.15)},
anchor=north,legend columns=0},
ylabel={Time in milisseconds},
symbolic x coords={s-HAS, s-cAS, CUDA-HAS},
xtick=data,
nodes near coords,
axis lines*=left,
y axis line style={opacity=0},
yticklabels={\empty},
ytick style={draw=none},
cycle list={
{fill=black!60,draw=black!60},
{fill=black!40,draw=black!40},
{fill=black!20,draw=black!20}
},
axis on top,
major grid style=white,
ymajorgrids,
legend style={draw=none,/tikz/every even column/.append style={column sep=0.5cm}}
%nodes near coords align={horizontal},
]
\addplot coordinates {(s-HAS,4) (s-cAS,4) (CUDA-HAS,6)};
\addplot coordinates {(s-HAS,44.60) (s-cAS,71.90) (CUDA-HAS,8.67)};
\addplot coordinates {(s-HAS,156) (s-cAS,334) (CUDA-HAS,18)};
\legend{Best 1\%,Average 1\%,Worst 1\%}
\end{axis}
\end{tikzpicture}
\end{document}