\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}
Legende von tikzpicture ist leider auf dem Seitenrand
Legende von tikzpicture ist leider auf dem Seitenrand
Ich möchte gerne, dass sich die eingestellte Breite nicht nur auf die tikzpicture, sondern auch auf die Legende bezieht.
Re: Legende von tikzpicture ist leider auf dem Seitenrand
Habe es inzwischen selbst gelöst bekommen. Hier das Ergebnis:
Allerdings ist das Ergebnis dann gestaucht. Hat jemand vielleicht eine Lösung?
Allerdings ist das Ergebnis dann gestaucht. Hat jemand vielleicht eine Lösung?
\documentclass[DIV = 20]{scrartcl} \usepackage{pgfplots , showframe} \begin{document} \resizebox{\columnwidth}{5cm}{% \begin{tikzpicture} \begin{axis}[% %height = 5.5cm,% %width = \textwidth 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}