[pstricks] ignore first n rows with \readdata

Patrick Drechsler patrick at pdrechsler.de
Thu Mar 31 23:10:41 CEST 2005


Herbert Voss wrote on 30 Mar 2005 19:51:43 MET:

> ----- Original Message ----- 
> From: "Patrick Drechsler" <patrick at pdrechsler.de>
> To: <pstricks at tug.org>
> Sent: Monday, March 28, 2005 4:55 P
> Subject: [pstricks] ignore first n rows with \readdata
>
>> Is there a way to tell `\readdata' to ignore the first n
>> row(s) in a data file?
>> 
>> I often have column names in the first row(s) as in
>> 
>> time forcex forcey
>> 0 0 0.2
>> 0.1 19 -20
>> 0.2 18 -22
>
> read the data with \readdata{\data}{filename}, then define
> \pstVerb{/time {} def /forcex {} def /forcey {} def }
>
> now it should be possible to use it in the usual way. I cannot
> test it, because I have no running system until weekend.

Thank you very much Herbert, this works fine!

The only drawback is that one has to know the column
names. Ignoring the first line would be easier (for the
user). But I have no idea if this is possible in postscript.

For my current work your solution is fine, since I do not have to
delete the first line in my data sets.

Thanks for your help,

Patrick
-- 
Photons have mass!!??
I didn't even know they were Catholic...




More information about the PSTricks mailing list