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

Tabellen und Grafiken erstellen und anordnen


StefanB
Forum-Fortgeschrittener
Forum-Fortgeschrittener
Beiträge: 84
Registriert: Mi 28. Jul 2010, 10:57

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

Beitrag 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]
Dateianhänge
umf.PNG
umf.PNG (149.51 KiB) 1038 mal betrachtet