Hi Ignasi,
your analysis is correct: pgfplots reads only the first two columns in
order to plot the data whereas
\pgfplotstabletypeset[header=false]{sin3.dat}
attempts to process the complete table. Since it expects *numerical* cell
content, it fails to typeset the third column . Although I would have expected
a better error message...
Your approach to explicitly select the desired columns is the solution.
Best regards
Christian
Am 23.09.2011 11:00, schrieb Ignasi Furió:
> El Thu, 22 Sep 2011 19:12:19 +0200, Ignasi Furió<[email protected]>
> vau escriure:
>
>> Hi all,
>>
>> erlier I've asked about processing tables with pgfplots. I've found how
>> to
>> do it with pgfplotstables but
>> my first test shows an error.
>>
>> next is a fragment of a data obtained with gnuplot (call them
>> tabletest.dat)
>> %---------------------------
>> # Curve 0 of 1, 100 points
>> # Curve title: "sin(3*x)"
>> # x y type
>> 0 0 i
>> 0.0634665 0.189251 i
>> 0.126933 0.371662 i
>> 0.1904 0.540641 i
>> 0.253866 0.690079 i
>> 0.317333 0.814576 i
>> 0.380799 0.909632 i
>> 0.444266 0.971812 i
>> 0.507732 0.998867 i
>> %-----------------------
>>
>> Processing it with
>>
>> %--------------------
>> \documentclass{article}
>>
>> \usepackage{pgfplotstable}
>>
>> \begin{document}
>> \pgfplotstabletypeset[header=false]{tabletest.dat}
>> \end{document}
>> %-------------------
>>
>> finishes with next error message
>>
>> %-------------
>> )
>> PGFPlots: reading {sin3.dat}
>>
>> ! Undefined control sequence.
>> \pgfflt@readinf ...sh \else \def \pgfflt@readinf@
>> {\pgfflt@error
>> #1#2}\expan...
>> l.12 \pgfplotstabletypeset[header=false]{sin3.dat}
>>
>> Could you help me? It's my first time with pgfplottables
>> Ah! I'm using miktex 2.9 and pgfplots from tlcontrib.
>>
> Some more experiments show that
>
> %--------------------
> \documentclass{article}
> \usepackage{pgfplots}
> \begin{document}
> \begin{tikzpicture}
> \begin{axis}
> \addplot file {tabletest.dat};
> \addplot table {tabletest.dat};
> \end{axis}
> \end{document}
> %-------------------
>
> works without problem, so pgfplots processes (or ignores) table's "type"
> column but \pgfplotstabletypeset don't.
> I've found a workaround with
> \pgfplotatabletypeset[columns={1,2}]{tabletest.dat}. Could you confirm
> that this is the best solution?
>
> Thank you,
>
> Ignasi
>
> ------------------------------------------------------------------------------
> All of the data generated in your IT infrastructure is seriously valuable.
> Why? It contains a definitive record of application performance, security
> threats, fraudulent activity, and more. Splunk takes this data and makes
> sense of it. IT sense. And common sense.
> http://p.sf.net/sfu/splunk-d2dcopy2
> _______________________________________________
> Pgfplots-features mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/pgfplots-features
------------------------------------------------------------------------------
All of the data generated in your IT infrastructure is seriously valuable.
Why? It contains a definitive record of application performance, security
threats, fraudulent activity, and more. Splunk takes this data and makes
sense of it. IT sense. And common sense.
http://p.sf.net/sfu/splunk-d2dcopy2
_______________________________________________
Pgfplots-features mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/pgfplots-features