PDA

Archiv verlassen und diese Seite im Standarddesign anzeigen : pgfplots: Unterschied \addplot [...] coordinates bzw. table???



RungeZipperer
13-08-2018, 15:17
Hallo,

ich versuche gerade zu verstehen, wo der Unterschied bei pgfplot ist bei der Dateneingabe zwischen:



\addplot [Optionen] coordinates {Punkte};


und



\addplot table [Optionen] {\mytable};


Bei der ersten Variante kann ich Marker, Line style etc. in den Optionen setzen, bei der zweiten Variante bleibt dies wirkungslos.

Was mache ich für einen Fehler???



\documentclass{article}
\usepackage{pgfplots}
\pgfplotsset{compat=newest}
\begin{document}
\begin{tikzpicture}[baseline]%
\pgfplotstableread{%
x y1 y2
0 0.8 1
0.1 1.7 2
0.2 2.4 2
0.3 5 4
0.4 0 1
0.5 -1 6
0.6 0 7
}\mytable%
\begin{axis}[%
xlabel={xlabel},%
ylabel={ylabel},%
]%

%HIER FUNKTIONIERT ALLES PRIMA:
\addplot+ [x=x,y=y1,
smooth,
no marks,
solid,
line join = round,
]
coordinates
{(0,0.8) (0.1,1.7) (0.2,2.4) (0.3,5) (0.4,0) (0.5,-1) (0.6,0)};

%HIER WERDEN DIE OPTIONEN IN ADDPLOT IGNORIERT:
\addplot+ table [x=x,y=y2,
smooth,
no marks,
dashed,
line join=round,
] {\mytable};
\end{axis}
\end{tikzpicture}
\end{document}


Problem gelöst, siehe identischer Post https://texwelt.de/wissen/fragen/22627/pgfplots-unterschied-addplot-coordinates-bzw-table