TPLOT(1g,C) AIX Commands Reference TPLOT(1g,C) ------------------------------------------------------------------------------- tplot PURPOSE Produces plotting instruction for a particular work station. SYNTAX +----- -T$TERM ------+ +--------+ tplot ---| +----------------+ |---| |---| +-| -T workstation |-+ +- file -+ +----------------+ DESCRIPTION The tplot command reads plotting instructions from standard input or from file, if specified. (For more information about plotting instructions, see the plot file format AIX Operating System Technical Reference). tplot writes instructions suitable for the specified work station to standard output. If work station is not specified, the environment variable TERM is used. (For more information about environment variables, see the environ file in AIX Operating System Technical Reference.) FLAGS -Tworkstation Uses the plotting instructions for workstation. You can specify the following for workstation: 300 For DASI 300 300s (or 300S) For DASI 300s 450 For DASI 450 4014 (or tek) For Tektronix 4014 print (or lp) For IBM PC Graphics Printer dumb For a generic printer EXAMPLES 1. To produce a graphical plot of the positive side of y=x^2 using the graph and tplot commands: a. Create a file "myfile" containing: 1 1 2 4 3 9 4 16 Processed November 8, 1991 TPLOT(1g,C) 1 TPLOT(1g,C) AIX Commands Reference TPLOT(1g,C) b. On one of the supported work stations, enter: graph < myfile | tplot -Tworkstation In the above example, graph uses the (x,y) input in "myfile" and creates plotting instructions that can be interpreted by tplot. tplot then plots the graph on the specified workstation. 2. To produce a graphical plot of a circle using libplot.a library routines and the tplot command (see plot subroutines in the AIX Operating System Technical Reference for more information): a. Create a C program "myprog" containing plot subroutines: main() { space(0,0,70,40); openpl(); circle(40,10,7); closepl(); } b. Link /usr/lib/libplot.a to myprog by entering: cc -o myexec /usr/lib/libplot.a myprog c. Run either of the following on one of the supported work stations: 1. myexec | tplot -Tworkstation 2. myexec > myfile tplot -Tworkstation myfile This example will plot a circle of radius 7 with center at the point (40,10). Note: libplot.a produces output that is device-independent. Other plot library routines such as libprint.a and lib300.a produce outputs that are device-dependent. When using such device-dependent plot library routines, the appropriate work station name must be supplied for the -T flag in tplot (in other words, if you use the routines in lib300.a of the plot subroutines, then you must use -T300 for tplot). FILES /usr/lib/t300 /usr/lib/t300s /usr/lib/t450 /usr/lib/t4014 /usr/lib/tprint /usr/lib/tdumb Processed November 8, 1991 TPLOT(1g,C) 2 TPLOT(1g,C) AIX Commands Reference TPLOT(1g,C) RELATED INFORMATION See the following commands: "graph" and "splp." See the plot subroutine and the plot file in AIX Operating System Technical Reference. Processed November 8, 1991 TPLOT(1g,C) 3