ich würde gerne die Legende rechts neben dem Säulendiagramm positionieren. Zusätzlich sollen die Säulen weiter auseinander liegen und graue Hilfslinien im Hintergrund sein.
Ich komme leider nicht weiter.
Danke für die Hilfe im Voraus.
\begin{center} \begin{tikzpicture} \begin{axis}[ ybar stacked, bar width=20pt, nodes near coords, enlargelimits=0.15, legend pos=outer north east, legend style={at={(0.5,-0.20)}, anchor=north,legend columns=-1}, ylabel={\%}, symbolic x coords={Basel II, 2013, 2014, 2015, 2016, 2017, 2018,2019}, xtick=data, x tick label style={}, ] %Blau Hartes Kernkapital, \addplot+[ybar] plot coordinates {(Basel II,2) (2013,3.5) (2014,4) (2015,4.5) (2016,4.5) (2017,4.5) (2018,4.5) (2019,4.5)}; %erweitertes Kernkapital \addplot+[ybar] plot coordinates {(Basel II,2) (2013,1) (2014,1.5) (2015,1.5) (2016,1.5) (2017,1.5) (2018,1.5) (2019,1.5)}; \addplot+[ybar] plot coordinates {(Basel II,4) (2013,3.5) (2014,2.5) (2015,2) (2016,2) (2017,2) (2018,2) (2019,2)}; %grau \addplot+[ybar] plot coordinates {(Basel II,0) (2013,0) (2014,0) (2015,0) (2016,0.625) (2017,1.25) (2018,1.875)(2019,2.5)}; \addplot+[ybar] plot coordinates {(Basel II,0) (2013,0) (2014,0) (2015,0) (2016,0.6) (2017,1.3) (2018,1.9)(2019,2.5)}; \addplot+[ybar] plot coordinates {(Basel II,0) (2013,3) (2014,5) (2015,5) (2016,5) (2017,5) (2018,5)(2019,5)}; \legend{Hartes Kernkapital,erweitertes Kernkapital, Ergänzungskapital, Kapitalerhaltungspuffer, Antizyklischer Kapitalpuffer,Systemische Kapitalpuffer} \end{axis} \end{tikzpicture} \end{center}