readdata possible with path ??

Denis Girou Denis.Girou at idris.fr
Fri May 22 10:34:12 CEST 1998


-----------------------------------------------------------------------------
This is the PSTricks mailing list, devoted to discussions about computational
graphics in (La)TeX using the PSTricks package from Timothy van Zandt.
For help using this mailing list, see instructions at the end of message.
-----------------------------------------------------------------------------

    Stefan.Keul> My question is now:

    Stefan.Keul> is there something like \readdata{\datas}{y:\folder\subfolder\data.dat}
    Stefan.Keul> existing?

  I can only answer for Unix systems, which are the only ones I can access.
For them, there is no problem to describe the complete pathname of the files
using TeX macros (there are nevertheless some restrictions: as it is easy to
verify, the "~" convention doesn't work).

  But I can't say anything for PC/Mac systems. 

\documentclass{article}

\usepackage{pst-plot}

\pagestyle{empty}

\begin{document}

\newcommand{\HomeDir}{/u/alg/girou}
\newcommand{\DataDir}{tex/PST/Plots}
\newcommand{\File}{test}

\begin{pspicture}(-2,-2)(2,2)
  \readdata{\test}{\HomeDir/\DataDir/\File.data}
  \dataplot[plotstyle=line]{\test}
  \psaxes{<->}(0,0)(-2,-2)(2,2)
\end{pspicture}

\newcommand{\HomeDirB}{/u/alg/girou/}
\newcommand{\DataDirB}{tex/PST/Plots/}

\begin{pspicture}(-2,-2)(2,2)
  \readdata{\test}{\HomeDirB\DataDirB\File.data}
  \dataplot[plotstyle=line]{\test}
  \psaxes{<->}(0,0)(-2,-2)(2,2)
\end{pspicture}

\end{document}

with test.data:

[
 -1.09 -0.55
 -0.4  -0.1
  0     1.02
  1.28  0.06
  1.51  1.21
]

D.G.

-----------------------------------------------------------------------------
The list interface (subscription, information, access to the archives) is on:
http://www.tug.org/cgi-bin/lwgate/pstricks
Otherway to unsubscribe, send mail to pstricks-request at mail.tug.org
with a blank subject and in body the line unsubscribe <email-address>
-----------------------------------------------------------------------------



More information about the PSTricks mailing list