[pstricks] Accessing individual members of a data set

Herbert Voss Herbert.Voss at FU-Berlin.DE
Thu Dec 10 09:59:15 CET 2009


Am 09.12.2009 21:48, schrieb Jorge Nto:

> %MyData.dat
> %Start position
> 0.0 0.0
> %Goal position
> 2.3 3.5
> %Goal and robot radius
> 0.2 0.3
> 
> (of course %comments should be ignored).
> 
> So I should read sequentially: First line (startX, startY) then read the
> third line,second column to get the radius and with that info draw a circle.
> Then repeat for the second line
> 
> I could think about using three columns the radii information for each line,
> like
> 
> %start pos. and radius of robot
> 0.0 0.0 0.2
> %goal pos and radius
> 2.3 3.5 0.3
> 
> I would like to use a function, say plotCircles like
> \readdata{\data}{C:/mydata.dat}
> \plotCircles{\data}
> 
> If the file does not exist then plotCircles should do nothing.


http://tug.org/PSTricks/main.cgi?file=pst-plot/DataExamples

the first example is a very special plot. You can modify
it for your need.

When the data is read, it is saved as
D x D x D x ...

where D could be used on PostScript side for some
data modification. Yiu can ignore it. Look into
the code of the above example.

Herbert


More information about the PSTricks mailing list