von esdd » Sa 19. Nov 2016, 13:31
Mir ist jetzt nicht unbedingt klar, was Du machen möchtest. Aber vielleicht geht das folgende in die richitge Richtung:
\documentclass[parskip=full]{scrbook}
\usepackage[T1]{fontenc}
\usepackage[ngerman]{babel}
\usepackage{lmodern}
\usepackage{pgfplots}% lädt auch tikz
\pgfplotsset{compat=1.13}% nach dem Laden von pgfplots unbedingt compat setzen!!
\usetikzlibrary{patterns}
\begin{document}
\begin{tikzpicture}
\pgfplotsset{
every linear axis/.append style={
height=8cm,
width=8cm,
enlarge x limits={abs=20pt},
ymin=0,
ymax=50,
symbolic x coords={0,10,20,30,40,50,60,70,80,90,100},
xmin=0,
xmax=100,
ybar,
bar width=10pt,
}
}
\begin{axis}[
%legend style={
%at={(0.5,-0.3)},
%anchor=north,
%legend columns=-1
%},
xtick={0,20,40,60,80,100},
ylabel={Abweichung in \%},
ytick={0,5,10,...,50},
ymajorgrids,
%nodes near coords,
%every node near coord/.append style={font=\footnotesize},
%point meta=explicit symbolic,
]
\addplot coordinates {
(0,49.00910427)
(10,52.67114996)
(20,30.03869207)
(30,16.19717274)
(40,11.793614)
(50,5.455339473)
(60,4.335891305)
(70,1.67210052)
(80,4.440822806)
(90,7.724997609)
(100,19.49464651)
};
\end{axis}
\begin{axis}[axis lines=none]
\addplot[red,pattern= north west lines,pattern color=red]
coordinates {(60,3.5)}
;
\end{axis}
\end{tikzpicture}
\end{document}
Mir ist jetzt nicht unbedingt klar, was Du machen möchtest. Aber vielleicht geht das folgende in die richitge Richtung:
[code]\documentclass[parskip=full]{scrbook}
\usepackage[T1]{fontenc}
\usepackage[ngerman]{babel}
\usepackage{lmodern}
\usepackage{pgfplots}% lädt auch tikz
\pgfplotsset{compat=1.13}% nach dem Laden von pgfplots unbedingt compat setzen!!
\usetikzlibrary{patterns}
\begin{document}
\begin{tikzpicture}
\pgfplotsset{
every linear axis/.append style={
height=8cm,
width=8cm,
enlarge x limits={abs=20pt},
ymin=0,
ymax=50,
symbolic x coords={0,10,20,30,40,50,60,70,80,90,100},
xmin=0,
xmax=100,
ybar,
bar width=10pt,
}
}
\begin{axis}[
%legend style={
%at={(0.5,-0.3)},
%anchor=north,
%legend columns=-1
%},
xtick={0,20,40,60,80,100},
ylabel={Abweichung in \%},
ytick={0,5,10,...,50},
ymajorgrids,
%nodes near coords,
%every node near coord/.append style={font=\footnotesize},
%point meta=explicit symbolic,
]
\addplot coordinates {
(0,49.00910427)
(10,52.67114996)
(20,30.03869207)
(30,16.19717274)
(40,11.793614)
(50,5.455339473)
(60,4.335891305)
(70,1.67210052)
(80,4.440822806)
(90,7.724997609)
(100,19.49464651)
};
\end{axis}
\begin{axis}[axis lines=none]
\addplot[red,pattern= north west lines,pattern color=red]
coordinates {(60,3.5)}
;
\end{axis}
\end{tikzpicture}
\end{document}[/code]