Legende von tikzpicture ist leider auf dem Seitenrand
Verfasst: Mi 8. Feb 2023, 15:32
Ich möchte gerne, dass sich die eingestellte Breite nicht nur auf die tikzpicture, sondern auch auf die Legende bezieht.
\documentclass[DIV = 20]{scrartcl} \usepackage{pgfplots , showframe} \begin{document} \begin{tikzpicture} \begin{axis}[% width = \textwidth,% height = 5.5cm,% legend style = {legend pos = outer north east}% ] \addplot[color=red,mark=x] coordinates{% (2,-2) (8,-7) }; \addlegendentry{Legende} \end{axis} \end{tikzpicture} \end{document}