Überarbeitungsverlauf[Zurück]
Klicke auf Einblenden/Ausblenden von Überarbeitungen 2
Problem ergänzt

21 Mai '22, 20:15

AndreGismo's gravatar image

AndreGismo
5961227

Wie kann ein ylabel in pgfplots groupplot umgebrochen werden?

Ich nutze `pgfplots` um mir ein paar plots zu erstellen. Manchmal werden die Beschriftungen der y-Achse zu lang. Bei der "normalen" `axis` Umgebung kann ich ja einfach `align=center` als Option übergeben und den Text dann mit `\\` umbrechen lassen. Wenn ich jetzt aber einen `groupplot`, `groupplot` verwende, dann bekomme ich nur eine Fehlermeldung. Fehlermeldung, wenn ich dem `align=center` sage. __Beispiel:__ \documentclass{scrartcl} \usepackage{pgfplots} \usetikzlibrary{pgfplots.groupplots} \pgfplotsset{width=0.91\textwidth, compat=1.18} \begin{document} \section{Test} Lange ylabel mit groupplot: \begin{figure}[h] \centering \begin{tikzpicture} \begin{groupplot}[height=5cm, group style={ group size=1 by 2, ylabels at=edge left}] \nextgroupplot[ylabel={Kurze Beschriftung}] \nextgroupplot[ylabel={Zu lange Beschriftung, die eigentlich umbrechen sollte}, xlabel={Kurze Beschriftung}] \end{groupplot} \end{tikzpicture} \caption{Mit \texttt{groupplot} erzeugter plot} \end{figure} Lange ylabel mit normaler axis: \begin{figure}[h] \centering \begin{tikzpicture} \begin{axis}[xlabel={Kurze Beschriftung}, ylabel={Lange Beschriftung\\ die tatsächlich\\ umbricht}, height=5cm, align=center] \end{axis} \end{tikzpicture} \caption{Mit \texttt{axis} erzeugter plot} \end{figure} \end{document} Hat jemand eine Idee, wie man die ylabel auch im `groupplot` umbrechen lässt?
Klicke auf Einblenden/Ausblenden von Überarbeitungen 1

21 Mai '22, 20:10

AndreGismo's gravatar image

AndreGismo
5961227

Wie kann ein ylabel in pgfplots groupplot umgebrochen werden?

Ich nutze `pgfplots` um mir ein paar plots zu erstellen. Manchmal werden die Beschriftungen der y-Achse zu lang. Bei der "normalen" `axis` Umgebung kann ich ja einfach `align=center` als Option übergeben und den Text dann mit `\\` umbrechen lassen. Wenn ich jetzt aber einen `groupplot`, dann bekomme ich nur eine Fehlermeldung. __Beispiel:__ \documentclass{scrartcl} \usepackage{pgfplots} \usetikzlibrary{pgfplots.groupplots} \pgfplotsset{width=0.91\textwidth, compat=1.18} \begin{document} \section{Test} Lange ylabel mit groupplot: \begin{figure}[h] \centering \begin{tikzpicture} \begin{groupplot}[height=5cm, group style={ group size=1 by 2, ylabels at=edge left}] \nextgroupplot[ylabel={Kurze Beschriftung}] \nextgroupplot[ylabel={Zu lange Beschriftung, die eigentlich umbrechen sollte}, xlabel={Kurze Beschriftung}] \end{groupplot} \end{tikzpicture} \caption{Mit \texttt{groupplot} erzeugter plot} \end{figure} Lange ylabel mit normaler axis: \begin{figure}[h] \centering \begin{tikzpicture} \begin{axis}[xlabel={Kurze Beschriftung}, ylabel={Lange Beschriftung\\ die tatsächlich\\ umbricht}, height=5cm, align=center] \end{axis} \end{tikzpicture} \caption{Mit \texttt{axis} erzeugter plot} \end{figure} \end{document} Hat jemand eine Idee, wie man die ylabel auch im `groupplot` umbrechen lässt?