From: ST%"ejst@cuphyd.bitnet" 16-MAY-1990 12:11:03.45 To: TJP CC: Subj: plotpg.hlp Received: from CUPHYD by Deimos.Caltech.Edu via BITNET ; Wed, 16 May 90 12:10:51 PDT Received: From CUPHYD(EJST) by CITDEIMO with Jnet id 7066 for TJP@CITDEIMO; Wed, 16 May 90 12:10 PST Message-Id: <900516121051.27e000a2@Deimos.Caltech.Edu> Date: Wed, 16 May 90 15:14 EST From: Subject: plotpg.hlp To: tjp@citdeimo Original_To: JNET%"tjp@citdeimo.bitnet" Interactive Pgplot via [Version 2.1] August 1989 Program PLOTPG from Ed Shaya PLOTPG USER'S GUIDE This is a quick description of how to operate PLOTPG, a facility which allows either interactive or command file operation of PGPLOT. With this facility, you need not write a program to make simple plots with PGPLOT. The data you want plotted just need to be in a file with any number of columns. Within PLOTPG, you specify the file with the command DATAFILE followed by the name of the file and the number of columns in the file. The program will read your data file in free format (not very good with strings). You specify which columns in the data file are to be used for x and y in the upcoming plot via the command XYCOLUMN. To start the program, type: $ plotpg PLOTPG will prompt you for the 'Plotting Command File:'; the response 'terminal' will allow the session to be interactive, otherwise you can respond with the filename of a command list. The commands read in are recorded in the file 'plt.plt'. Once produced 'plt.plt' can be copied, edited, and then used as the command file for similar plots. Next the program requests the 'Graphics device/type: '. The usual response, such as /tek (Tektronics graphics) or /ps (Postscript for Laserwriters) will direct the output for this pgplot run. Then you are asked how the page will be divided into sections. The page can be divided into NX horizontal sections and NY verticle sections. For one plot per page, the response should be "1 1". The command ENV will set up the axes. The data is plotted only when the command PLOT is given. No more than 500 points can be plotted at a time, but the command PLOT can be repeated. The '%' sign is the comment character; any line beginning with '%' is ignored. Limited online help is available by typing: 'help any_command'. A UNIX system command can be executed by starting the command line with the '$' symbol. The following are the commands that PLOTPG understands. Each command is followed by specified parameters. The parameters may be real, integer or strings. No quotes are necessary for strings. Be sure to give all required parameters for each command. Refer to the PGPLOT manual for more information about the basic operations. If you wish more PGPLOT commands to be incorporated, let me know and I can simply add them. ED SHAYA 8/15/89 COMMANDS: ========= For labeling and setting up coordinates: xlabel ANYSTRING label for x-axis ylabel ANYSTRING Label for y-axis. tlabel ANYSTRING Label for top of plot. setc CHARACTER_SIZE Character size [1.0]. setlw LINE_WIDTH Line thickness. setls LINE_STYLE 1-FULL,2-DASHED,3-DOTDASH,4-DOTTED, OR 5-FANCY setfont FONT_TYPE 1-NORMAL, 2-ROMAN, 3-ITALIC, 4-SCRIPT just Set just-parameter for pgenv to 1. axis INTEGER Set axis-parameter for pgenv. env XMIN XMAX YMIN YMAX Set up axes with numerical labels. autoscale Switch on and off autoscale of axes: with autoscale, axes are automatically set up during plotting. label Put x,y and tlabels around axes. advance Advance to a new (sub)page. vstand Define viewport to be standard viewport. window X1 X2 Y1 Y2 Change the window in world coordinate space. box XOPT XTICK NXSUB YOPT YTICK NYSUB Calls pgbox with standard options. vport XLEFT XRIGHT YBOT YTOP Change viewport, specified in normalized device coordinates. The file with the data is specified so: datafile NAME_OF_FILE NUMBER_OF_COL xycolumn NX NY string Use if first column contains string names. nostring To turn off string flag. Various ways of plotting the data: point POINT_SYMBOL plot data as points. All data with same symbol. points NCOL_POINT_SYMBOL Plot data as points. Symbol types in column NCOL_POINT_SYMBOL of datafile. line connect data with a line hist DATAMIN DATAMAX histogram that bins for you bin CENTER (Logical) histogram that you bin move X Y move without plotting draw X Y a simple straight line to X,Y To add error bars: errx NERRX1 NERRX2 ERRXT erry NERRY1 NERRY2 ERRYT To actually plot: plot NDATA_PTS The datafile is read and the data is plotted. If you don't know how many data points there are just use 500 which is the largest number permitted. Add legends and strings anywhere in the graph interactively: labels You are then prompted for the text and the coordinates of the labels. rewind To rewind the datafile. skip NSKIP To skip NSKIP lines. print To print out x, y data values before plotting. noprint To turn off printing of x,y data values. Some odd-and-ends help COMMAND Get online help for each command. text NCOLUMN To plot the values in a third column at the given x,y position. curse [X Y] Obtain interactively the X,Y position on the plot. X and Y are optional coordinates. Move the cursors with the arrows, then hit any key to get coordinates. repeat NUMBER_OF_TIMES Repeats following commands multiple times. endrepeat Ends section of commands to be repeated goto LABEL Continue commands after LABEL:. Be sure to add ':'. Rotation of coordinate axes: rottheta ANGLE(radians) Rotates viewer and axes counterclockwise around z-axis. rotphi ANGLE(radians) Rotates viewer and axes counterclockwise around x-axis. If both rotations are made rottheta is done first. xyzcolumn X_COLUMN Y_COLUMN Z_COLUMN Needed for rotphi command only. polar NTHETA_COLUMN NR_COLUMN Use polar coordinates: instead of xycolumn. Use spherical coordinates: spherical NTHETA_COLUMN NPHI_COLUMN NR_COLUMN instead of xycolumn. lwswitch Turn off and on the setlw command. (when off, setlw = 1) Connect a second point along the same radial direction with each point (in spherical coordinates): pair SECOND_ND terminal Return to interactive mode from a command file. commandfile [filename] Return control to previous command file or name a new one. quit When finished.