von Gast » Fr 3. Feb 2017, 16:45
Das geht ganz einfach mit Option fill=white für den entsprechenden
node:
\documentclass[12pt,titlepage,a4paper]{report}
\usepackage{graphicx}% pdftex als Option grundsätzlich weglassen!
\usepackage{pgfplots}
\pgfplotsset{compat=1.14}% Laut Anleitung immer anzugeben!
\begin{document}
\begin{figure}[tbh]
\begin{tikzpicture}
\begin{axis}[legend style={at={(0.5,1)},anchor=south , legend columns = 3}, ymajorgrids,xmajorgrids]
\addplot coordinates {(0,0) (1,1)};
\addplot coordinates {(0,1) (1,2)};
\addplot coordinates {(0,2) (1,3)};
\node[black,fill=white,above] at (axis cs: 0.5,1){{\Large testtext}};
\legend{c=1.5 ,b=1.6, a=1.4}
\end{axis}
\end{tikzpicture}
\end{figure}
\end{document}
Beachte unbedingt auch die zusätzlichen Änderungen in meinem Code!
Das geht ganz einfach mit Option [tt]fill=white[/tt] für den entsprechenden [i]node[/i]: [code]\documentclass[12pt,titlepage,a4paper]{report}
\usepackage{graphicx}% pdftex als Option grundsätzlich weglassen!
\usepackage{pgfplots}
\pgfplotsset{compat=1.14}% Laut Anleitung immer anzugeben!
\begin{document}
\begin{figure}[tbh]
\begin{tikzpicture}
\begin{axis}[legend style={at={(0.5,1)},anchor=south , legend columns = 3}, ymajorgrids,xmajorgrids]
\addplot coordinates {(0,0) (1,1)};
\addplot coordinates {(0,1) (1,2)};
\addplot coordinates {(0,2) (1,3)};
\node[black,fill=white,above] at (axis cs: 0.5,1){{\Large testtext}};
\legend{c=1.5 ,b=1.6, a=1.4}
\end{axis}
\end{tikzpicture}
\end{figure}
\end{document}[/code]
Beachte unbedingt auch die zusätzlichen Änderungen in meinem Code!