Seite 1 von 1

Liniendiagramm aus csv, wenn keine Einträge ->keine Linie

Verfasst: Sa 23. Jan 2016, 11:19
von StefanB
Hallo,

ich versuche aus einer csv-Datei ein Liniendiagramm zu erstellen. Geht soweit auch, nur habe ich nicht für alle x-Werte einen y-Wert.
Mit LibreOffice Calc (Bild A) "endet" die Linie, falls es keinen y-Wert gibt.
Latex bzw. pgfplot zieht die Linie weiter (Bild B).
Kann ich das irgendwie unterbinden?

\begin{tikzpicture}
\begin{axis}[
%width=0.9\textwidth,height=0.9\textheight,
width=0.9\textwidth,
title={},
xtick={1,2,3,4,5,6,7,8,9},
%	x tick label style={/pgf/number format/1000 sep=},
xlabel={Jahr},
ylabel={richtige Antworten in \%},
ymin=0, ymax=1, xmin=1, xmax=9,enlarge x limits=0.01]

\addplot table[x=Tag, y=0] {bis500.csv};
\addplot table[x=Tag, y=1] {bis500.csv};
\addplot table[x=Tag, y=2] {bis500.csv};
\addplot table[x=Tag, y=3] {bis500.csv};
\addplot table[x=Tag, y=4] {bis500.csv};
\end{axis}
\end{tikzpicture}
[/quote]