Hi!
So?
Code:
\documentclass{article}
\usepackage{pgfplots}
\usetikzlibrary{patterns}
\tikzstyle{myxbarlegend}=
[
/pgfplots/legend image code/.code=
{\draw [##1, line width=0.2pt]
(0,-0.5pt) rectangle (3pt,0.5pt)
(4.5pt,-0.5pt) rectangle (7.5pt,0.5pt)
(9pt,-0.5pt) rectangle (12pt,0.5pt);
}
]
\begin{document}
\begin{tikzpicture}
\begin{axis}[xbar,enlargelimits=0.15, myxbarlegend]
\addplot
[draw=blue,pattern=horizontal lines light blue]
coordinates
{(10,5) (15,10) (5,15) (24,20) (30,25)};
\addplot
[draw=black,pattern=horizontal lines dark blue]
coordinates
{(3,5) (5,10) (15,15) (20,20) (35,25)};
\legend{nr1,nr2}
\draw[red] (axis cs:10,10) -- (axis cs:10,0);
\end{axis}
\end{tikzpicture}
\end{document}
Lesezeichen