Import of selected rows of a data set (without header line)
The import should make use of the column numbers instead of row headers. The pgfplots' manual presents the possibility to use the command \thisrowno{}
that takes a number in $\mathbbm{N}_0$.
Similar MWE that works fine
The following example works (without error message) but is not what is intended:
\documentclass{standalone}
\usepackage{pgfplots}
\pgfplotsset{compat=newest}
\usepackage{filecontents}
\begin{filecontents*}{data.dat}
aasd dasdf basdf casdf
1 4 5 1
2 3 1 5
3 5 6 1
4 1 4 9
\end{filecontents*}
\begin{document}
\begin{tikzpicture}
\begin{axis}[%
xlabel={xlabel},
ylabel={ylabel}]
\addplot[color=blue,mark=none]
table [x=aasd, y=casdf, col sep=space] {data.dat};
\addplot[color=red, mark=none]
table [x=aasd, y=basdf, col sep=space] {data.dat};
\end{axis}
\end{tikzpicture}
\end{document}
Best Answer
The difference to the MWE in the question is that
\thisrow{}
or\thisrowno{}
need a different argument in the table's options, i.e. instead ofthe following command shows the identical result
or with row numbers (without header line):