Code:
\documentclass{scrbook}
\usepackage{filecontents}
\usepackage{pgfplots}
\pgfplotsset{
compat=1.11,% <- wichtig, mindestens Version 1.11
every axis label/.append style={font=\sffamily\small},
every axis legend/.style={y tick label style={/pgf/number format/1000 sep=},x tick label style={/pgf/number format/1000 sep=}},
every axis legend label/.append style={font=\sffamily\small},
every tick label/.append style={font=\sffamily\small},
every axis title/.append style={font=\sffamily\bfseries},
%select row/.style={ x filter/.code={\ifnum\coordindex=#1\else\def\pgfmathresult{}\fi}},
%ylabsh/.style={every axis y label/.style={at={(0,0.5)}, xshift=#1, rotate=90}}
}
\begin{document}
\begin{filecontents}{Daten.dat}
Gruppe MW1 SD1 MW2 SD2 Label
Hans 3 1 4 1 {}
Peter 4 1 5 2 {}
Sven 5 2 6 1 $\star$
Tim 6 3 7 2 $\star$
Max 7 4 8 2 {}
\end{filecontents}
\begin{figure}
\centering
\begin{tikzpicture}
\begin{axis}[
title={{\sffamily\bfseries Ueberschrift Test}},
height=8cm,
width=10cm,
bar width=0.65cm,
axis y line=left,ymin=0,ymax=15,ylabel=Y-Achse,
ybar=0pt,% Abstand zwischen schwarzen und weißen Säulen soll 0 sein
error bars/.cd,error bars/y explicit,error bars/y dir=plus,
axis x line*=bottom,xtick=data,
x tick label style={align=center, yshift=0cm,rotate=45},
xticklabels from table={Daten.dat}{Gruppe},
legend entries={1,2},
legend style={at={(1.2,0.075)},draw=none,/tikz/every even column/.append style={column sep=2pt},font=\sffamily\footnotesize},legend cell align=left, %Position der Legende, xy
legend image code/.code={\draw[#1] (0cm,-0.1cm) rectangle (0.5cm,0.1cm);},
%%% neu:
point meta=explicit symbolic,
nodes near coords,
nodes near coords align={vertical},
every node near coord/.append style={
anchor=center,shift={(0,\myshift)},font={\bfseries\huge}}
%%%
]
\addplot[fill=black,visualization depends on=\thisrow{SD1}+1\as \myshift]
table [x expr=\coordindex,x=Gruppe, y=MW1,y error=SD1,meta=Label] {Daten.dat};
\addplot[fill=white,visualization depends on=\thisrow{SD2}+1\as \myshift,]
table [ x expr=\coordindex,x=Gruppe, y=MW2,y error=SD2,meta=Label] {Daten.dat};
\end{axis}
\end{tikzpicture}
\end{figure}
\end{document}
Lesezeichen