Dann hätte ich noch eine Frage.
Hab auf Grundlage deiner Vorlage zwei weitere Balkendiagramme erstellt. Die möchte ich gerne als Abbildungen nebeneinander in die Arbeit integrieren (siehe Anhang).
Wie bekomme ich die Legende oberhalb der beiden Abbildungen und die einzelnen Einträge nebeneinander?
\documentclass{standalone}
\usepackage{pgfplots}
\usepackage{siunitx}
\pgfplotsset{
compat=newest,
/pgf/number format/.cd, use comma
}
\begin{document}
\begin{tikzpicture}
\begin{axis}[node font=\normalsize,
height=1.3*\axisdefaultheight,
width=\axisdefaultwidth,
xbar,
xtick={0,50,...,500},
axis x line=none,
%axis y line=left,
ylabel=Metallseifendosierung in \%,
y axis line style = { opacity = 00 },
tickwidth = 0pt,
enlarge y limits = 0.5,
enlarge x limits = 0.02,
symbolic y coords = {0, 0.5, 1},
ytick=data, % verringert die vier Einträge auf zwei
nodes near coords,
reverse legend,
legend style={
draw=none,
legend cell align=left,
at={(1,1)},
xshift=0cm,
yshift=-2cm,
anchor=south
}
]
\addplot [fill=white] coordinates { ( 312,0) (52,0.5) (74,1) };
\addplot [fill=gray!40] coordinates { ( 312,0) (91,0.5) (93,1) };
\addplot [fill=gray] coordinates { ( 312,0) (79,0.5) (82,1) };
\addplot [fill=black!85] coordinates { (312,0) ( 195,0.5) ( 76,1)}; % Änderung der Füllfarbe
\legend{LIGAPHOB ZN101 Plus, LIGA Calciumstearat 860, Zinkstearat 101, LIGAPHOB ZN 502}
\end{axis}
\end{tikzpicture}
\begin{tikzpicture}
\begin{axis}[
height=1.3*\axisdefaultheight,
width=\axisdefaultwidth,
xbar,
xtick={0,50,...,500},
axis x line=none,
%axis y line=left,
ylabel=Metallseifendosierung in \%,
y axis line style = { opacity = 00 },
tickwidth = 0pt,
enlarge y limits = 0.5,
enlarge x limits = 0.02,
symbolic y coords = {0, 0.5, 1},
ytick=data, % verringert die vier Einträge auf zwei
nodes near coords,
reverse legend,
%legend style={
%draw=none,
%legend cell align=left,
%at={(1,1)},
%xshift=0cm,
%yshift=-2cm,
%anchor=south west
%}
]
\addplot [fill=white] coordinates { ( 358,0) (189,0.5) (148,1) };
\addplot [fill=gray!40] coordinates { ( 358,0) (212,0.5) (222,1) };
\addplot [fill=gray] coordinates { ( 358,0) (192,0.5) (179,1) };
\addplot [fill=black!85] coordinates { (358,0) ( 189,0.5) ( 171,1)}; % Änderung der Füllfarbe
%\legend{LIGAPHOB ZN101 Plus, LIGA Calciumstearat 860, Zinkstearat 101, LIGAPHOB ZN 502}
\end{axis}
\end{tikzpicture}
\end{document}
Gibt es die Möglichkeit die "symbolic y coords" des zweiten Diagramms auszublenden?