GPLOT recipes: Using GPLOT for the first time
GPLOT is a General Plot program based on subroutines of the
plot package PGPLOT and specially written routines to interface
with the GDS (GIPSY Database System). The program enables you to plot
contour- grayscale- and colour plots of GIPSY images. It plots
profiles taken from a GIPSY image, reads data from file,
manipulates this data (using expressions) and plots it in various
ways (line diagram, histogram etc.). GPLOT labels axes with
physical coordinates if those axes are related to a GIPSY set.
GPLOT is command driven and therefore cannot be compared
with a program like CPLOT which is controlled by keywords.
GPLOT has one major keyword:
COMMAND=This keyword is prompted in a loop. It processes plot commands like frame, move, draw, quit etc. with or without parameters. For the (very) impatient we introduce the command that closes files and quits GPLOT:
COMMAND=quitLike all GPLOT commands, this command can be written in upper- or lower case and it can be abbreviated. So the following commands all have the same effect:
COMMAND=quit COMMAND=q COMMAND=Quit COMMAND=QCommand quit is one of the commands that has no parameters. Commands like move and draw must be followed by parameters. Others, like lstyle and location generate information if used without parameters or execute code if used with parameters.
helpAn Ascii file (myhelp.txt) with a short description of all available commands can be made with:
file myhelp.txt helpSpecific help can also be obtained with the help command. Suppose you want some information about all commands containing the word 'lab':
help *lab*From within Hermes, it is always possible to consult the GPLOT documentation (this is not the so called gplot.dc1 document!) with command manual. You enter an editor (defined by environment variable EDITOR) that displays an Ascii version of the GPLOT documentation.
device ppsfile/aurora.ps inset Aurora freq 7 box -156 -56 -35 64 xsize 65 ysize 65 levels 0.5 0.9:13.5:1.8 grayscale levels 0.9:18:1.8 contours frame closeOutput will be sent to file aurora.ps on disk. The GIPSY set is called Aurora and we want data from the 7th subset in frequency. Scaling of a plot is always done in combination of two commands. The first sets the limits (box or xrange & yrange). The second sets the number of grids/mm (xsize & ysize or range & yrange). box without parameters will read the entire subset. Commands xsize and ysize are the width and the height of a plot in millimeter. If you want a scale that fills the plot device, use command autoscale after inset or box. Gray scale and contour commands read the contents of what is set with levels. The syntax for entering these levels is the same as the standard GIPSY syntax for numbers, so 0.9:18:1.8 evaluates to levels 0.9 2.7 4.5 ... 17.1. Command frame draws the axes and plots the coordinate labels. A device is closed after command close.
write main mycoms.txtmain is the name of the macro you are building if you just started GPLOT and entered commands. In this macro, all commands are executed immediately. Edit file mycoms.txt in an editor outside Hermes. Execute the commands from mycoms.txt with:
input mycoms.txtBut before you do this, it is convenient to clear a screen device with erase or clear.