after searching for some time without finding a satisfying answer, I finally decided to post my first question. Using the search function, I found simmilar questions, but non of the answer given there where satisfying either.
My problem: I am using pgfplots to display results in bar graphs and tested the data for significant differences by ANOVA and Dunnett's Multiple Comparison Test vs. one control. I would like to have something, that looks like this:
I produced this using the following code:
\documentclass{scrartcl}%
\usepackage[T1]{fontenc}%
\usepackage[utf8]{inputenc}%
\usepackage[ngerman]{babel}%
\usepackage{amsmath}%
\usepackage{tikz}%
\usepackage{pgfplots}%
\pgfplotsset{width=7cm,compat=1.7}%
\begin{document}%
\begin{tikzpicture}%
\begin{axis}[%
ybar,%
title=Test,%
axis y line=left, axis x line*=bottom,%
ymin=0, ymax=70,%
x tick label style={rotate=45,anchor=east},%
symbolic x coords={A, B, C, D, E},%
ylabel=difference in \%,%
]%
\addplot+[%
color=black,%
error bars/.cd,%
y dir=both,%
y explicit,%
]%
table[%
y error=err%
] {barexample.txt};%
\addplot[black, sharp plot]%
coordinates {(A,50) (D,50)}%
node[above] at (150,500) {***}%
;%
\addplot[black, sharp plot]%
coordinates {(A,60) (E,60)}%
node[above] at (150,600) {**}%
;%
\end{axis}%
\end{tikzpicture}%
\end{document}%
This ist the content of the datafile:
xval yval err sig
A 1 0.2 control
B 10 2.5 n.s.
C 20 2.2 n.s.
D 40 4.2 ***
E 28 2.8 **
I am looking for a solution, that would check the sig collum for the asteriks and given the case there are *** or ** or * draws a line above the colums and inserts the appropriated numer of * at a certain position of the line. In addition, lines should be stacked, starting with the far right on top and so on.
Thank you for your help!

