\putfile

<#482#>\putfile{<#193#>filename<#193#>}{<#194#>object<#194#>}<#482#>

The command 90 is similar to the 91 command except that the x and y coordinates required by the 92 command are read from an external file and the same <#195#>object<#195#> is plotted at each of those coordinates.

The motivation behind this command is that TEX does not have the capability to do floating point calculations which would be required if one wished to plot any parametric curve other than straight lines. Coordinates for such curves can be easily generated by programs in other languages and subsequently a ``dotted'' curve can be plotted via TEX or LATEX. Even if coordinates for certain curves could be generated from within TEX, it is much more efficient to use other languages --- eventually only the coordinates of the points are required. For instance, one can use the Unix4 facility <#197#>spline<#197#> to generate smooth curves with equidistant ``dots''.

<#198#>Format of the External File:<#198#> The external file of coordinates must have ``x  y '' pairs, one pair on each line, with a space between them. Also, it is suggested that some extension such as ``<#199#>.put<#199#>'' be used for such data files to distinguish them from regular text files in which case it must be explicitly specified in the first argument so that TEX doesn't look for a ``<#200#>.tex<#200#>'' extension.

The ``<#201#><#201#>'' character remains valid as a comment character and such lines are ignored. However, there should be at least one space after the second entry if a comment is on the same line as data since <#202#><#202#> eats up the newline.

For example, to plot a smooth curve along a set of coordinates, one may undertake the following steps:

  1. have a file of ``x  y'' coordinates for original data points, say, <#204#>datafile<#204#>.
  2. run the command (for Unix systems): <#205#>spline -200 datafile ;SPMgt; data.put<#205#>
  3. in a picture environment in a LATEX file, put the command:
    93
    (see previous section for explanation of 94).