Hi there I got the following problem at hand. I load my plot data automatically from an external .csv file and manipulate it via a simple expression (conversion from ms to seconds) before plotting it via pgfplots. My problem arises whenever I have empty values to plot, the expression returns
Package PGF Math Error: Could not parse input '' as a floating point number, sorry. The unreadable part was near ''. (in '/1000').
For better understanding the MWE
\documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage{pgfplots}
\usepackage{filecontents}
\begin{filecontents}{testdata.csv}
a;b;c
5000;;2000
\end{filecontents}
\begin{document}
\begin{tikzpicture}
\begin{axis}[
legend entries = {
\textbf{a},
\textbf{b},
\textbf{c},
}
]
\addplot table[x expr=\coordindex,y expr=\thisrow{a}/1000, col sep=semicolon]{testdata.csv};
\addplot table[x expr=\coordindex,y expr=\thisrow{b}/1000, col sep=semicolon]{testdata.csv};
\addplot table[x expr=\coordindex,y expr=\thisrow{c}/1000, col sep=semicolon]{testdata.csv};
\end{axis}
\end{tikzpicture}
\end{document}
In this example column b has the empty value which results in the error because of the expression. My question is how can I get around that error without inserting NaN in the empty space.


\pgfplotstableread, the missing coordinate is plotted as0even without theempty cells with={0}. In fact,empty cells withhas no effect on the table when it's used within a plot, it only affects table output using\pgfplotstabletypeset. – Jake Nov 23 '12 at 00:01