Hat jemand eine Idee, wie ich die Schriftart der Zahlen im Diagramm ändern kann (die bunten Zahlen, welche die Länge der Balken angeben). Ich würde das gerne in der selben Schriftart wie die Achsen haben.
Ich danke für eure Hilfe.
\documentclass{article} \usepackage{pgfplotstable,float} \pgfplotsset{compat=1.18}% siehe https://texwelt.de/fragen/19163 \begin{document} \begin{figure} [H] \pgfplotstableread[col sep=space, header=false]{ 2005 6.6 12.2 35.1 30.8 12.9 2.4 2010 4.5 10.8 38.4 32.7 12.5 1.8 2014 3.5 9.2 40.5 33.5 11.5 1.7 2015 3.6 9.1 41.2 33.3 11.0 1.8 2016 3.4 9.0 42.1 33.5 10.5 1.5 2017 3.5 8.9 42.1 33.2 10.8 1.5 2018 3.4 9.0 42.5 33.0 10.4 1.7 2019 3.4 8.8 42.5 33.5 10.1 1.7 2020 3.7 9.2 42.5 33.1 9.9 1.6 2021 3.7 9.1 42.9 32.8 9.7 1.8 }\datatable \begin{tikzpicture} \begin{axis}[ width=0.9\linewidth, height=0.6\textheight, yticklabels from table={\datatable}{0},% enlarge y limits={abs=0.9cm},% enlarge x limits = 0.1, ytick=data, xbar stacked, ytick=data, nodes near coords, point meta=rawx, nodes near coords style={yshift=10pt,font=\small,anchor=center}, axis y line=left, axis x line=none, legend style={at={(0,-.1)},anchor=north west,nodes=right}, ylabel={Jahr}, ticklabel style={/pgf/number format/.cd, fixed, use comma, assume math mode}, ] \addplot table [x=1, y expr=\coordindex] {\datatable}; \addplot table [x=2, y expr=\coordindex] {\datatable}; \addplot table [x=3, y expr=\coordindex] {\datatable}; \addplot table [x=4, y expr=\coordindex] {\datatable}; \addplot table [x=5, y expr=\coordindex] {\datatable}; \addplot+[nodes near coords style={at={(\pgfkeysvalueof{/data point/x},\pgfkeysvalueof{/data point/y})}}] table [x=6, y expr=\coordindex] {\datatable}; \addlegendentry{1,0 - 1,4 sehr gut}
\addlegendentry{1,5 - 1,9 gut} \addlegendentry{2,0 - 2,4 befriedigend} \addlegendentry{5,5 - 2,9 ausreichend} \addlegendentry{3,0 - 3,4 nicht ausreichend} \addlegendentry{3,5 - 4,0 ungenügend} \end{axis} \end{tikzpicture} \end{figure} \end{document}