[pstricks] \listplot, single point and regression
Poul Riis
Poul.Riis at skolekom.dk
Sat Feb 19 11:45:54 CET 2005
Herbert Voss <Herbert.Voss at alumni.tu-berlin.de> skriver:
>\documentclass[a4paper]{article}
>
>\usepackage{pstricks,pst-plot,pst-node,multido}
>\SpecialCoor
>\psset{unit=1pt}
>
>\def\FileName{node.data}% the data file
>
>\makeatletter
>\def\saveDataAsNodes{%
> \typeout{Open file \FileName}%
> \openin7=\FileName%
> \newcount\nMax\nMax=21\relax% datarecords+1
> \newcount\nrepeat\nrepeat=1\relax%
> \loop%
> \def\NodeName{N\the\nrepeat}%
> \ifnum\nrepeat<\nMax
> \read7 to \Data
> \pnode(\Data){\NodeName}
> \typeout{\NodeName -> \Data}
> \advance\nrepeat by 1
> \repeat%
> \closein7%
>}
>%
>\makeatother
>
>\begin{document}
>
>\begin{center}
>\begin{pspicture}(-150,-150)(150,150)
> \saveDataAsNodes% must be inside the pspicture environment
>% \fileplot[linecolor=red,linewidth=1pt,linestyle=dashed]{\FileName}%
> \multido{\iA=1+1}{20}{
> \pscircle*[linecolor=blue](N\iA){10pt}}% Node: N#
>\end{pspicture}
>\end{center}
>
>\end{document}
I can't make this example work on my computer, even if it says 'no errors
found'. The strange thing is that apparently no log-file is produced!?!?!?
Moreover, I find it rather inconvenient that one has to tell the computer
the number of data in the data file. Rather, the computer should tell me!
Yours,
Poul Riis
More information about the PSTricks
mailing list