von esdd » Di 16. Feb 2016, 22:13
Bartman meint vermutlich die Dokumentation zu [d]pgfplots[/d]. Bei der derzeitigen Version 1.13 käme dann auch eher das Beispiel auf Seite 84 unten in Frage.
Falls Du nur die Beschriftung nicht aber die Koordinatenangaben bei den einzelnen Plots ändern möchtest, dann wäre eine weitere Möglichkeit
\documentclass[10pt,a4paper]{article}
\usepackage[latin1]{inputenc}
\usepackage{amsmath}
\usepackage{amsfonts}
\usepackage{amssymb}
%\usepackage{graphicx}% wird von pgfplots mit geladen
\usepackage{pgfplots}
\pgfplotsset{compat=1.12}
\begin{document}
\begin{tikzpicture}
\begin{axis}[
height=6cm,
width=\textwidth-0.5cm,
enlargelimits=0.02,
legend style={
at={(xticklabel cs:.5)},% Legende unterhalb der Ticklabels
anchor=north,
legend columns=-1
},
ymin=0,
ymax=100,
%x tick label style={/pgf/number format/1000 sep=},% wird das benötigt?
x tick label style={rotate=45,anchor=east},
xtick={0,...,6},% Ticks
xticklabels={text1, text2, text3, text4, text5, langer text6},% zugehörige Beschriftungen
ylabel={richtige Antworten in \%},
ybar interval=0.7,
ytick={0,10,...,100}
]
\addplot coordinates {
(0,43.6782)
(1,65.4321)
(2,79.7468)
(3,84.6154)
(4,66.6667)
(5,61.6438)
(6,33.2)
};
\addplot coordinates {
(0,65.4378)
(1,83.0128)
(2,87.785)
(3,91.3333)
(4,81.407)
(5,80.2448)
(6,33.2)
};
\addplot coordinates {
(0,56.25)
(1,73.0769)
(2,62.069)
(3,74.0741)
(4,79.1667)
(5,54.1667)
(6,33.2)
};
\addplot coordinates {
(0,70.5584)
(1,82.2581)
(2,70)
(3,88.9503)
(4,77.6536)
(5,79.0698)
(6,33.2)
};
\legend{Stichprobe 1,Stichprobe 2,Stichprobe 3, Stichprobe 4}
\end{axis}
\begin{axis}[
height=6cm,
width=\textwidth-0.5cm,
enlargelimits=0.02,
ymin=0,
ymax=100,
ytick={0,10,...,100},
hide x axis,
axis y line*=right,
]
\addplot[opacity=0]{100};
\end{axis}
\end{tikzpicture}
\end{document}
Bartman meint vermutlich die Dokumentation zu [d]pgfplots[/d]. Bei der derzeitigen Version 1.13 käme dann auch eher das Beispiel auf Seite 84 unten in Frage.
Falls Du nur die Beschriftung nicht aber die Koordinatenangaben bei den einzelnen Plots ändern möchtest, dann wäre eine weitere Möglichkeit
[code]\documentclass[10pt,a4paper]{article}
\usepackage[latin1]{inputenc}
\usepackage{amsmath}
\usepackage{amsfonts}
\usepackage{amssymb}
%\usepackage{graphicx}% wird von pgfplots mit geladen
\usepackage{pgfplots}
\pgfplotsset{compat=1.12}
\begin{document}
\begin{tikzpicture}
\begin{axis}[
height=6cm,
width=\textwidth-0.5cm,
enlargelimits=0.02,
legend style={
at={(xticklabel cs:.5)},% Legende unterhalb der Ticklabels
anchor=north,
legend columns=-1
},
ymin=0,
ymax=100,
%x tick label style={/pgf/number format/1000 sep=},% wird das benötigt?
x tick label style={rotate=45,anchor=east},
xtick={0,...,6},% Ticks
xticklabels={text1, text2, text3, text4, text5, langer text6},% zugehörige Beschriftungen
ylabel={richtige Antworten in \%},
ybar interval=0.7,
ytick={0,10,...,100}
]
\addplot coordinates {
(0,43.6782)
(1,65.4321)
(2,79.7468)
(3,84.6154)
(4,66.6667)
(5,61.6438)
(6,33.2)
};
\addplot coordinates {
(0,65.4378)
(1,83.0128)
(2,87.785)
(3,91.3333)
(4,81.407)
(5,80.2448)
(6,33.2)
};
\addplot coordinates {
(0,56.25)
(1,73.0769)
(2,62.069)
(3,74.0741)
(4,79.1667)
(5,54.1667)
(6,33.2)
};
\addplot coordinates {
(0,70.5584)
(1,82.2581)
(2,70)
(3,88.9503)
(4,77.6536)
(5,79.0698)
(6,33.2)
};
\legend{Stichprobe 1,Stichprobe 2,Stichprobe 3, Stichprobe 4}
\end{axis}
\begin{axis}[
height=6cm,
width=\textwidth-0.5cm,
enlargelimits=0.02,
ymin=0,
ymax=100,
ytick={0,10,...,100},
hide x axis,
axis y line*=right,
]
\addplot[opacity=0]{100};
\end{axis}
\end{tikzpicture}
\end{document}[/code]