Program: GPLOT Purpose: General macro based plot program for interactive use of PGPLOT subroutines and the Gipsy Data Subsystem (GDS). Category: PLOTTING File: gplot.c Author: M.G.R. Vogelaar ======================= DOCUMENTATION AND HELP: ======================= All GPLOT commands have a separate description that can be read from within GPLOT. At the COMMAND= keyword type: help for a list all available commands. or type: help abcd for a description about abcd. (Note that an asterisk ('*') character can be used as a wild card). A GPLOT users manual in HTML format can be found on the Kapteyn Homepage under GIPSY/recipes/gplot. Keywords: COMMAND= In 'main' mode (macro "main"): EXECUTE command n in "main": In 'macro' mode (macro "xxx"): STORE command n for macro "xxx": Enter a GPLOT command (with parameters). Depending on the current mode, the command is executed or stored. Stored commands can be used as a macro. COMMAND=help generates a list with GPLOT commands and COMMAND= displays information about syntax and use of the specified GPLOT command. example: COMMAND=help *info displays help about 'setinfo', 'devinfo' and 'plotinfo' GRDEVICE= Graphics device [list of all graphics devices] Name of the device to which the plot commands are directed (minimal match implemented). Examples: 0. NULL (Null device) 1. TEKTRONIX (Tektronix) 2. L1LASER, L2LASER, LPSFILE (PostScript Landscape) 3. P1LASER, P2LASER, PPSFILE (Postscript Portrait) 4. LCOLOUR, LCPSFILE (Colour Postscript Landscape) 5. PCOLOUR, PCPSFILE (Colour Postscript Portrait) 6. XTERM (Xterm in tektronix mode) 7. GIDS (GIDS in graphics mode) 8. THERTEK (thermes tektronix window) 9. X11 (PGPLOT X11 driver) Note that Postscript File devices have the option to send output to a file given by the user. The syntax is GRDEVICE=[/]. Example: GRDEVICE=PPSFILE/myfile.ps Notes: You can expect more GPLOT keywords than described above because macro's can generate their own keywords which have a meaning in the context of that macro. Example: See documentation. Updates: Jan 22, 1993: VOG, Document created. Dec 2, 1994: VOG, Small changes, e.g. 'xsize', 'ysize' 'beam' commands. Apr 6, 1995: VOG, New commands 'profint', 'profaxis', 'keyword', 'manual', 'file'. Character heights now in mm. May 21, 1995: VOG, New commands 'autoscale', en commands related to polarisation. Number formatting in text is possible using the {} characters. Aug 8, 1995: VOG, Included mosaic commands. Oct 7, 1997: VOG, pgbeam replaced by beam. Aug 20, 1998: VOG, Add new set of vectors va, ..., vz. Dec 23, 1999: VOG, Changed (fint) in NINT() for 'profbox'. May 1, 2007: JPT, Included conditional code for Apple Mac. Apr 14, 2009: VOG, Changed definition of macro NINT to one which uses floor() for consistency with other routines that process coordinates. Also minor clean up of unused code. Jun 15, 2009: JPT, Replaced private strdup() by private StrDup() Aug 11, 2009: JPT, Renamed getline to GetLine Description: See gplot.html File structure: =============================================================== Data for a command starts with a line containing '#start' A data block ends where a '#end' is encountered. There must be one data block for each command. =============================================================== Description and syntax of all GPLOT commands: #start command: angle syntax: angle [x] If x is omitted, the current value is displayed. The angle applies to plotted text strings. example: angle 90 ! Rotate text over +90 degrees #end #start command: arrow syntax: arrow x1 y1 [x2 y2] If two numbers are given, then draw an arrow from current position to x1 y1. If four numbers are given then move to x1 y1 and draw to x2 y2. The cursor position after the arrow command will always be x2, y2. note: The style of the arrowhead can be changed with the 'arstyle' command. #end #start command: arstyle syntax: arstyle [fs angle style] Command arstyle without parameters will list the current style for arrowheads. If you want to change these settings you can use the following parameters: fs: Fill Style: fs = 1 => filled; fs = 2 => outline. Other values are treated as 2. Default 1. angle: the acute angle of the arrow point, in degrees; angles in the range 20.0 to 90.0 give reasonable results. Default 45.0. barb: the fraction of the triangular arrow-head that is cut away from the back. 0.0 gives a triangular wedge arrow-head; 1.0 gives an open >. Values 0.3 to 0.7 give reasonable results. Default 0.3. #end #start command: autoscale syntax: autoscale Set a default location and scale so that a frame will fit on the current device. If a set is read and no box was set then 'autoscale' will also set the default box to the size of the entire (sub)set. #end #start command: axdelta syntax: axdelta [d] [units] d is major tick separation. If no units are given, d is in world coordinates, else d is in units entered by the user. For an offset axis with physical coordinates, the offset will plotted in the user given units. if d is omitted, a default value will be calculated. example: axdelta 5.0 ! Separation major ticks is 5 (world coordinates) axdelta 10 arcmin ! Convert value to header units axdelta ! Calculate default note: The value for 'axdelta' is reset after the use of the 'axis' command' #end #start command: axformat syntax: axformat [string] 'string' is a text string used as format template. If the string is an empty string, the general format will be used for numerical labels. The hms format will be used for a spatial longitude axis and the dms format will be used for a spatial latitude axis. In the hms/dms formats part(s) of the label are always printed if the corresponding field is fixed by a capital. table: string | number | result | remark =============|============|=============|============================ +eeeeee.eeee | 43345.5436 | +4.3346e+04 | exp. format, signed convers. gggg.ggggg | 34.43 | _____34.430 | field width is 10 +ffff.ff | 23.456 | __+23.46 | signed conversion -ffff | 345.87 | 346 | left justified -+ffff.fff | 34.43 | +34.430 | left justified, signed conv. eee.eeee | 234.43 | ________* | field width too small ffff.ff | blank | _______b | input was a blank hms | 45 | 3h0m0s | program determines precision hms.ss | 45 | 3h0m0.00s | 2 digits in precision hms. | 45 | 3h0m0s | 0 digits in precision dms | 45 | 45o0' | program determines precision dmS | 45 | 45o0'0'' | always print the seconds note 1: If your start position for plotting major ticks is not a 'nice' number, but the step size is, the default precision in the hms/dms formats, could be too small to label correctly. If this occurs, set the precision with the 'axformat' command. #end #start command: axis syntax: axis B/R/T/L [P][W][O][F][Z][In1n2][An1n2] B = Bottom axis, T = Top axis, R = Right axis and L = left axis. P = Physical coord. labels W = World coord. labels, O = Offset labels. F = FITS transformations: phys = CRVAL + grid*CDELT Z = Plot labels as 10**(World coordinate). E = Extend the major label ticks to create a coordinate grid. I11 = Plot ticks marks inside frame. I10 = Plot ticks marks outside frame. I00 = Do NOT plot any tick marks A11 = Plot labels inside frame. A10 = Plot labels outside frame. A00 = Do NOT plot any labels example: axis B ! Plot Bottom axis, no labels axis BW ! Plot Bottom axis, labels are world coordinates axis BP ! Plot Bottom axis, labels are converted ! coordinates ! a set must be given with inset command. note: The default position for the tick marks is inside the frame and for the labels outside the frame. Only if you want to change this scheme, you need the 'I' and/or 'A' options. The 'E' option can create an incomplete coordinate grid because for some projections the opposite axis labels do not show the same labels. In that case repeat the 'axis' commands with the 'E' option for both opposite axes and use the same 'axpos' and 'axdelta' values for these axes. The 'cgstep' (coordinate grid step) command sets the sampling of the points at which the grid coordinates are calculated. #end #start command: axlogs syntax: axlogs [x1 x2 x3...] Define the major tick marks on a logarithmic axis. i.e. plot labels as 10^(world/physical coordinate). The default labels are .. 0.01 0.1 1 10 etc. If you specify x1 x2 etc. (and 1.0 <= xi < 10) then also the numbers x1 x2 etc. are plotted. note: The axis specification must include the character Z. Example: axlogs 1 3 5 Plot major ticks at ...0.1 0.3 0.5 1 3 5 10 30 50 100 ..... #end #start command: axminors syntax: axminors [n] n is the number of minor intervals between two major ticks. If n is omitted, the current value is displayed. If n < 0 a default is calculated. note: The value of axminors is reset after plotting an axis, so it is only valid for the next call to 'axis' #end #start command: axpos syntax: axpos [x] [units] x is position where first label has to be plotted, x is in world coordinates. If the current axis belongs to a set, x can be given in units compatible with the units found in the header. A list with units can be generated with: help units If 'axpos' has no parameters, a default value will be calculated. For physical coordinates, the program uses the GIPSY syntax. Spatial positions: * ; for RA or DEC in resp. HMS and DMS. *1950 ; for RA or DEC in resp. HMS and DMS in EPOCH 1950.0 *xxxx.x ; for RA or DEC in resp. HMS and DMS in EPOCH xxxx.x G ; Galactic longitude or latitude in degrees E ; Ecliptic longitude or latitude in degrees S ; Supergalactic longitude or latitude in degrees example: axpos 120 ! Start writing ticks at world coord. 120 axpos 200 km/s ! Convert value to header units axpos ! Calculate default axpos PC ! Start at to projection centre axpos AC ! Start at axis centre in set (naxis/2-crpix) axpos * -60 12 23 ! Spatial position in dms for latitude axpos * 12 30 5.5 ! Spatial position in hms for longitude #end #start command: axtitle syntax: axtitle [string] if 'string' is omitted, a default title is plotted. note: A position for the title is obtained only after using the axis command with the option W or P included. #end #start command: beam syntax: Two different situation are distinguished: 1) There is a 2-dim (sub)set and the map is a spatial map: beam major minor [pos.angle] [lines] [slope] [shape] The items "major [units]", "minor [units]" and "angle" can be replaced by "header". This will read the appropriate header item from header of the set. major = FWHM of major axis of beam in grids (world coordinates) or header compatible units. minor = FWHM of minor axis of beam in grids (world coordinates) or header compatitble units. angle = Angle (deg) between the North in your spatial map and the major axis, taken in the direction of positive latitude (for an RA axis i.e. anti-clockwise). 2) There is a 2-dim (sub)set but the map is NOT a spatial map: beam Xaxis [units] Yaxis [units] [angle=0.0] [lines] [slope] [shape] Xaxis = FWHM (in x dir.) of beam in grids (world coordinates) or header compatitble units. Yaxis = FWHM (in y dir.) of beam in grids (world coordinates) or header compatitble units. angle = 0.0. The angle for such a set is not defined and is set to zero by the program. Therefore the order of the beam axes is important. The first axis must be in the X-direction and the second in the Y-direction. 3) There is not a set available: beam Xaxis Yaxis [angle] [lines] [slope] [shape] Xaxis = FWHM (in x dir.) of beam in world coordinates Yaxis = FWHM (in y dir.) of beam in world coordinates angle = Angle between the beam axis in X-direction and the X- axis. The other (optional) parameters are the same for each situation: lines = Number of shade lines crossing axis in y direction slope = Slope of shade lines in degrees. shape = 1 an elliptical beam (default). 2 a rectangular beam. 3 a cross Examples: ad 1) 1: beam 1.4 arcmin 1 arcmin ! A beam with mjor axis 1.4 ! arcmin aligned with the north 2; beam 1.4 arcmin 1 arcmin 110 20 30 2 ! Same beam at angle 110 degrees ! with 20 shade lines at slope 30 ! deg. However the beam is ! rectangular now. note: Draw a shaded ellipse in world coordinates. The position angle (set by command 'angle') of the 'Xaxis' is wrt. the pos. x-axis. The ellipse is rotated counter-clockwise. The interior of the ellipse is shaded with lines The number of lines is lines' and the slope of the lines is 'slope' (deg.). #end #start command: box syntax: box xlo ylo xhi yhi example: box -10 -10 120 90 ! Box from (-10,-10) to (120,90) box PC D 10 10 ! Box with sizes 10x10 centered around ! the projection centre of the set ! that was selected with command 'inset' note: -The GIPSY input syntax for boxes (like 'PC', 'AC', 'D' etc.) can only be used if a set is known. In that case the box may exceed the subset size. -The limits can also be changed with commands 'xrange' and 'yrange' (with or without a given set), but then the input is always in world coordinates! It is allowed to set xlo > xhi and ylo > yhi for boxes (without a set) and ranges. #end #start command: cgstep syntax: cgstep [x] If x is omitted, the current value is displayed. note: This command is used if you are not satisfied with the coordinate sampling in the coordinate grid that was plotted with the 'E' option in the 'axis' command. The default value is 1.0, i.e. a grid coordinate is calculated at each pixel. To accelerate the process, select a value greater than 1.0. If you want a more accurate grid, select a value less than 1.0. #end #start command: charheight syntax: charheight [x] (mm) If x is omitted, the current character height is displayed. note: The size affects all text and graph markers. The default size is corresponds to a character height about 1/40 the height (in mm) of the view surface. Changing the character size also scales the length of tick marks for standard boxes (without physical coordinates) and terminals drawn by the 'errorbar' command. #end #start command: clear syntax: clear note: For non-interactive use. This command will be stored in the list. See also 'erase' #end #start command: clist syntax: clist [one or more column names] The column names can be abbreviated. example: clist x ex ycol eycolumn #end #start command: closeplot syntax: closeplot note: Only after this command, a plotfile is closed or a plot is sent to a printer. If you used the 'hardcopy' command it is not necessary to use 'closeplot'. #end #start command: colbar syntax: colbar [width] [height] [orientation] Plot an annotated grey-scale or color wedge at the current pen position using the current colour settings in GIDS. Height and width are in mm and are defined for every orientation of the colour bar/wedge. If you specify one of the axis orientations L, R, T or B (together with width & height) then L and R define a vertical bar and T and B define a horizontal bar. The labels are controlled by the commands 'axpos', 'axdelta' and 'axformat'. note 1: A colour bar is plotted starting at the current pen position. #end #start command: color syntax: See description at colour #end #start command: colour syntax: colour [n] or: colour [colour name] n is a colour number. If n is omitted, the current colour index is displayed. For the names, wildcards (*) can be used ======= AVAILABLE COLOURS ======= 0 Background 1 Foreground or Default (Black if background is white) 2 Red 3 Green 4 Blue 5 Cyan 6 Magenta 7 Yellow 8 Orange 9 GreenYellow 10 GreenCyan 11 BlueCyan 12 BlueMagenta 13 RedMagenta 14 DarkGray 15 LightGray 16-255 Undefined #end #start command: colplot syntax: colplot recipe: Use GIPSY application VIEW to start GIDS and adjust colours. getlut ! Command to fix the current colour settings. device lcpsfile ! Select a colour device inset myset ! Set of which you want a colour plot. box ! Define the box. colplot ! Create the colour plot. levels 1:10 ! Select levels for contours. contours ! Draw the contours. end ! Close the plot, your PostScript file is ready. note: The GIDS colour Look Up Table and levels are used by the program to create a colour plot. GIDS must be available and set to your own preferences. Your graphics device must be a colour device e.g. keyword GRDEVICE=lcpsfile or command 'device lcpcfile' If you want a colour plot and contours at the same time, use the 'colplot' command before the 'contours' command. Otherwise you will see no contours in your hardcopy. #end #start command: colrep syntax: colrep index red green blue note: Set colour representation: i.e., define the color to be associated with a color index. The colours red, green and blue are number between 0.0 and 1.0. example: colrep 20 0.5 0.1 0.75 #end #start command: connect syntax: connect [b] note: Connect coordinates given in xcolumn, ycolumn by lines. The default 'connect' interprets blanks as values that cannot be plotted and skips making connections between one or more blanks. If option 'b' is used, the blanks are completely ignored. Connections between points will not be interrupted. example: xcolumn file(xcol,1,1:) ! Read x data from file ycolumn file(ycol,1,1:) ! Read y data from another file xrange xcolumn ! Range is min/max of this column yrange ycolumn xsize 120 ! Size of plot in mm ysize 80 color foreground ! Set colour to foreground frame symbol 17 ! Select a marker symbol points ! Plot the markers color green connect b ! Connect the points, ignore blanks #end #start command: contlab syntax: contlab [intval] [minint] [label] The spacing of labels along the contour is specified by parameters INTVAL and MININT. The routine follows the contour through the array, counting the number of cells that the contour crosses. The first label will be written in the MININT'th cell, and additional labels will be written every INTVAL cells thereafter. A contour that crosses less than MININT cells will not be labelled. Some experimentation may be needed to get satisfactory results; a good place to start is the default (which is intval 20, MININT 10). If you want your own text along a contour, then specify a label. Then however, you need to specify intval and minint also note: See also 'contours'. Note that the contour label routine does NOT recognize blank values. #end #start command: contticks syntax: contticks [tick length] [tick step] Length of ticks in world coordinates. If tick length is positive, the direction of the ticks is toward a maximum. If it is a negative number, it points to a minimum. The tick step is an integer and sets the separation of the ticks in grids! note: Defaults are 0.5 for the tick length and 1 for the tick step. #end #start command: contours syntax: contours note: Contours can only be plotted if levels are specified (levels command) Each contour line is drawn with the current line attributes (color index (color), style (lstyle), and width (lwidth). #end #start command: cursor syntax: cursor [mode] note: Start a loop in which the cursor position can be read. A position is displayed if a key is pressed. You can leave the cursor loop by pressing 'q' or 'Q'. The last position can be marked by pressing 'm' or 'M' (See also at 'symbol') Other keys can also be defined. Their definition is returned as a command. See 'curtxt'. The commands are executed immediately if a lower case character is pressed. If an upper case character is pressed, the command can be edited on the command line. The cursor 'mode' is implemented but there are currently no GIPSY devices that support different cursor styles. Mode is a number between 0 and 7. #end #start command: curtxt syntax: curtxt #key string This command defines a keyboard character (a-z) as a key definition in the interactive environment started with 'cursor'. The string can include C-type formats. For each format pair, a x,y coordinate pair is substituted The coordinate pairs are the current cursor position. The maximum number of coordinate pairs is 4. All keys can be defined except 'Q' and 'M' because they have a definition in 'cursor'. example: curtxt #A draw %f %f Define for use in 'cursor' the A key as command draw x y where x y are the current cursor position. Start 'cursor' with COMMAND=cursor and press -a- to execute the draw command or press -A- to edit the draw command. #end #start command: delete syntax: 1) delete 'macroname' 2) delete number-expression The syntax for the number expression follows the rules for the GIPSY input of integer numbers. example: delete curve ! delete macro curve delete 3 ! delete line 3 in current macro delete 3:6 ! delete lines 3 4 5 and 6 in current macro #end #start command: device syntax: device [devicename] [nx] [ny] devicename: name[//append] or name[/'filename'] name: the name of a known GIPSY plotting device //append: write to device but do not clear first. /filename: write hardcopy output to this file instead of a file with name generated by the program. nx: the number of subdivisions of the view surface in X. ny: the number of subdivisions of the view surface in Y. The program puts nx x ny graphs on each plot page or screen; when the view surface is sub-divided in this way, PAGE moves to the next sub-page, not the next physical page. Note: Sending output to a hardcopy device is only done after the command 'end' to close the current device. example: device gids ! select device GIDS for plotting device ! prompt with GRDEVICE= (has list of devices) device gids//append ! append to existing image in gids window device PPSFILE/myfile.ps ! write output to PPSFILE with #end ! name 'myfile.ps'. #start command: devinfo syntax: devinfo #end #start command: draw syntax: draw x y example: see examples 'move' #end #start command: edit syntax: edit [macroname] example: edit ! edit current macro edit curve ! start or edit macro curve, ! return to calling environment note: Abort editor action with ^C #end #start command: ellipse syntax: ellipse Xaxis [units] Yaxis [units] [start] [end] [delta] Plot ellipse at current pen position Xaxis = Semi axis (in x dir.) of ellipse in world coordinates Yaxis = Semi axis (in y dir.) of ellipse in world coordinates start = Angle (deg) to start drawing ellipse, default is 0 end = Angle (deg) to stop drawing ellipse, default is 360 delta = sample angle increment in degrees. Units can be given only if a set is known! note: Draw an ellipse in world coordinates. The position angle (set by command 'angle') of the 'Xaxis' is wrt. the pos. x-axis. The ellipse is rotated counter-clockwise. The plotting starts at 'start' degrees from the 'Xaxis' and stops at 'end' degrees from this 'Xaxis'. #end #start command: end syntax: end Quit insert mode while building a macro, or quit macro and go to 'execute' (or 'main') mode. example: end ! leave insert mode end ! leave macro, jump to execute mode note: Use 'closeplot' to close a device before sending a plot to a printer. #end #start command: environ syntax: environ xlo ylo xhi yhi [just] [axis] just: if just=1, the scales of the x and y axes will be equal otherwise they will be scaled independently. axis: -2 : draw no box, axes or labels -1 : draw box only 0 : draw box and label it with coordinates 1 : same as 0 but also draw lines x=0 and y=0 2 : same as 1, but also draw grid lines at major inc. 10 : draw box and label x-axis logarithmically 20 : draw box and label y-axis logarithmically 30 : draw box and label both axes logarithmically example: environ 0 0 100 50 1 0 ! draw box in equal scales and label axes note: default values for just and axis are 1 and 0 resp. #end #start command: erase syntax: erase note: This interactive command cannot be stored in a macro. See also 'clear'. #end #start command: errorbar syntax: 1) errorbar [y] [x] [-y] [-x] 2) errorbar [y1] [units] [x1] [units] [y2] [units] [x2] [units] ad 1) y, x, -x, -y are typed as shown, order is unimportant. ad 2) y1, x1, y2, x2 are floating point numbers, order is important. units can be used only if a set was given with the 'inset' command. note: As soon as one number is found, the routine draws one error bar with given bar lengths. Else, all positions in 'xcolumn, ycolumn' with corresponding errors in 'excolumn' or 'yxcolumn' will get an error bar. example: errorbar y -y ! draw vertical error bar. Length of bar in ! one direction is given by the corresponding ! value in 'eycolumn'. Repeat action for all ! points in 'xcolumn, ycolumn'. errorbar 5 4 ! vertical error bar of length 5 and a hori- ! zontal error bar of length 4. #end #start command: excolumn syntax: see description at xcolumn #end #start command: eycolumn syntax: see description at xcolumn #end #start command: expand syntax: expand x [y] x and y are expansion factors for the x- and y direction note: Only the scale(s) will be affected by the 'expand' command. The expansion is always with respect to the current values of 'xscale' and 'yscale', so 'expand 1 1' will reset the scales to their original values. example: expand 2.2 0.8 ! Expand factor 2.2 in x direction ! and shrink factor 0.8 in y direction #end #start command: fastyle syntax: fastyle [n] If n is omitted, the current value is displayed. The default value is 2 (=hollow). If n is 1, the rectangle will be filled in the current colour example: fastyle 1 ! solid fill fastyle 2 ! hollow (outline only) fastyle 3 ! hatched fastyle 4 ! cross hatched #end #start command: file syntax: file filename help [item1, item2, ...] or: file filename xcolumn/ycolumn/excolumn/eycolumn [xc../..] First option can be used to print a help file with command descriptions. file filename help will write all available help to file filename. If items (e.g. some commands) are entered after 'help' then only the help that is available for these items are written to file. The second option is used to write data stored in one of the GPLOT columns to a file. After the file name, one or more column names can be entered e.g.: file profile.txt ycolumn eycolumn which will store the contents of 'ycolumn' and 'eycolumn' to a file on disk with name 'profile.txt'. #end #start command: font syntax: font [n] or: font [normal]/[roman]/[italic]/[script] If n is omitted, the number of the current font is listed, together with a list of available fonts. example: font 3 ! All subsequent text is in italic font font italic ! Same note: 1 = (default) a simple single stroke font (normal) 2 = roman font 3 = talic font 4 = script font #end #start info: formats Use: text-command [characters] [{[format,]expression}] [characters] format is a string containing the optional flags '+', '-', followed by characters indicating field width and precision. Text commands are 'text', 'xlabel', etc. Example: text Values at theta {fffff.fff,pi/2} Table: format | input | output | remark nr ========================================================= +eeeeee.eeee | 43345.5436 | +4.3346e+04 | 1 gggg.ggggg | 34.43 | 34.430 | 2 +ffff.ff | 23.456 | +23.46 | 3 -ffff | 345.87 | 346 | 4 -+ffff.fff | 34.43 | +34.430 | 5 eee.eeee | 234.43 | * | 6 ffff.ff | blank | b | 7 Remarks: 1) exponential format, signed conversion 2) field width is 10 3) signed conversion 4) left justified, integer format 5) signed, left justified 6) field width too small for conversion 7) input was a blank #end #start command: frame syntax: frame note: This command consists of 4 calls to the 'axis' command (if subset. dimension equals 2 Use the 'axis' commands if more 'label' control is wanted. #end #start info: functions example: To plot the function y=sin(x) for 0 < x < 90 use commands: xcol 0:90 !generate values 0..90 in xcolumn ycol sin(rad(xcolumn)) !take the sine of each entry in xcolumn points !plot the markers at each x, y #end #start command: getlut syntax: getlut [header] note: Fix the current GIDS colour lut. This colour characteristics will be used for all colour plots of a set until 'getlut' is used again. This command must be used before using the 'colplot' command. The lut is preserved after the 'reset' command. A lut can be stored in a set given with 'inset' with command 'storelut'. To retrieve it, use 'getlut header'. #end #start command: gids syntax: gids note: For an overlay over an image displayed in GIDS (after command 'view' or GIPSY application VIEW), first select 'device gids//append' or 'GRDEVICE=gids//append' at the start of GPLOT. Then use GPLOT command 'gids' to read the set and box from GIDS and adjust the scales and offsets. After this, the command 'frame' can be used to draw a frame. The plot mode after this command is always 'world coordinates'. #end #start command: grayscale syntax: grayscale note: Create a gray scale plot of the data in the set, subset as specified in 'inset' and 'box'. The levels are selected with the 'levels' command. The number of levels must be at least two. The first level appears in shade 0 ('background') and the last level appears in shade 1 ('foreground'). The shading algorithm depends on the selected device. If you sort levels in descending order, the shading will change from dark to light. #end #start command: hardcopy syntax: hardcopy [device specification] example: hardcopy p1laser ! re-execute commands for p1laser ! close plot file and send it #end #start command: help syntax: help item1 item2 ... help * example: help *lab* ! display help about all commands ! containing 'lab' help * ! display all available help note: With command 'file filename help', all help information is sent to an Ascii file with name -filename-. #end #start command: histobin syntax: histobin [center] center: if yes, the xcolumn values denote the center of the bin, if no, the xcolumn values denote the lower edge (in x) of the bin. The default value for center is yes note: Plot a histogram of values with xcolumn values along the ordinate, and ycolumn along the abscissa. Bin width is spacing between X values. #end #start command: histogram syntax: histogram [nb] nb: the number of bins to use (in 'xcolumn' data) if omitted, 10 is substituted. note: The range given by 'minmax' is divided into nb equal bins and the number of 'xcolumn' values in each bin is determined by this routine. 'nb' may not exceed 200. #end #start command: id syntax: id note: Plot string with user name and date on position of pen. This position can be changed with 'move'. The text attributes apply also to this command. #end #start command: input syntax: input 'filename' example: input myplot.txt ! input and execute contents of 'myplot.txt' note: If you change or extend the contents of main and want to write it back to disk in the old file, use: write main 'myplot.txt' #end #start command: inset syntax: inset [set] [subset(s)] Use GIPSY input syntax for set, subset(s) note: After a valid 'inset' specification, some commands are treated in a different way. For instance 'box' now follows the GIPSY standard input syntax for boxes and all positions can be given in the standard GIPSY way. #end #start command: interpol syntax: interpol on/off interpol yes/no Set PostScript's interpolation mode on or off. PostScript levels 2 and higher have a mode in which an image is interpolated. The method is a bilinear interpolation method incorporated in the PostScript output. example: interpol on colplot interpol off note: Blanks are not interpolated. #end #start command: justificat syntax: justificat [n] if n is omitted, the current justification will be displayed note: 'justificat' controls the horizontal justification of strings. If justific=0.0 the string will be left-justified at the current pen position. If justific=0.5, it will be centered and if justific=1.0, text will be right justified. #end #start command: keyword syntax: keyword command prompt Generate a keyword prompt. The name of the keyword is given in 'command' (do not include '=' character!). The prompt is given in 'prompt'. The text that is entered at the prompt will be passed to the command given in 'command' for execution. example: keyword xrange Give xrange Generates keyword XRANGE= and prompts with: Give xrange #end #start command: levels syntax: levels x1 x2 ... xn [perc] If no parameters are given, the command generates a list with the current levels. There is a maximum to the number of levels (...) If the last argument is perc , all the levels will be scaled between values specified with 'minmax'. The conversion from percentages to absolute levels is done with the formula: level[i] = min + perc[i]/100 * [max-min] so that 0% results in the level 'min' and 100% results in 'max' To inverse the shading of the gray scales, use a descending order for the levels e.g. 1000 800 400 100 example: minmax set ! min, max of current set levels 2 10 50 perc ! 2% 10% 50% #end #start command: list syntax: list [expression] The syntax for the expression follows the rules for the GIPSY input of integer numbers. example: list ! list all lines in current macro list 3 ! list line 3 in current macro list 3:6 ! list lines 3 4 5 and 6 in current macro #end #start command: location syntax: location [x] [y] x and y are numbers in mm that indicate the offset from the lower left corner of your device. If both numbers are omitted, the current offsets are displayed. The lower left corner of the current box is plotted at the position given with 'location' (in mm) or 'ulocation' (in world- coordinates). The relocation can be used for instance to create panels. note: If you use location x y, the values x y indicate (in mm) the position on the device of the lower left corner of the viewport If you want a position in world coordinates, use command 'ulocation' #end #start command: lstyle syntax: lstyle [n] note: lstyle 1 : full line (default) lstyle 2 : long dashes lstyle 3 : dash-dot-dash-dot lstyle 4 : dotted lstyle 5 : dash-dor-dot-dot #end #start command: lwidth syntax: lwidth [n] If n is omitted, the current width is displayed. note: This command affects lines, graph markers and text. But the exact appearance is device dependent. The minimum number is 1 and the maximum is 21. #end #start command: macdir syntax: macdir [pathname] example: macdir /zwi1/users/whoever/macro Search for macro in directory /zwi1... note: macdir without argument resets path to current directory #end #start command: macro syntax: macro macroname example: macro rotcur ! start or update macro rotcur ! Equivalent to: edit rotcur note: Start a macro in execute mode by typing the name of the macro. f.i. rotcur NGC443 64 (Start macro rotcur with variables NGC443 and 64) #end #start command: marker syntax: marker [filename] Plot marker at current pen position. The marker is a symbol as defined with the command 'symbol' If a file name is given, then markers are plotted on all positions that could be extracted from the file. Each line in the file must have a valid two dim. position specification according to the GIPSY syntax for input of positions. A line can be empty or contain comment (starting with the '!' character). note: A series of markers can also be plotted using the 'xcolumn', 'ycolumn' 'symbol' and 'points' commands. Then the input can only be grid positions. example: A file 'pos.txt' contains the positions: * 10 16 47.99 * 45 46 59.9 * 10 16 43.22 * 45 48 9.8 * 10 16 38.44 * 45 49 19.7 ! Last of the physical coordinates !back to grids 80.3 56.7 Markers are plotted with: device x11 inset n3198h f 2 box frame marker pos.txt #end #start command: minmax syntax: minmax n1 n2 minmax set minmax head minmax xcol (or ycol, excol, eycol) minmax (without parameters, displays current values example: minmax 0 10.2 ! set min to 0 and max to 10.2 minmax set ! determine min, max of current set ! in current box. minmax header ! get min, max from header of current set. minmax xcolumn ! min, max from xcolumn. #end #start command: mmeter syntax: mmeter note: Switch back to world coordinates with command 'world' #end #start command: mosaic syntax: mosaic Starts an internal macro which will prompt you for the set and subsets, the character height of the axis titles (the height of the axis position labels will be scaled with this number), the mosaic layout ('moslxly') and a number of commands that must be repeated for each mosaic panel (MOSCOM0=, MOSCOM1=, etc). The MOSCOM keywords are used to specify GPLOT commands with their parameters. There are some restrictions: the commands cannot be abbreviated and macro's cannot be used. Pressing carriage return at the MOSCOMn= keyword, starts repeating the entered mosaic commands for each panel in the mosaic. A lot of assumptions are made in this internal GPLOT macro and of course you lose flexibility, but it is easy to use. If however you want to set up a mosaic using GPLOT commands, then examine the next example. example: location 30 30 color foreground inset aurora f box xsize 120 ysize 80 moslxly 6 6 mosframe levels 1 10 20 40 100 subset 1 color yellow conto ! ======== Next frame ======= mosnext subset 2 color green conto ! ======== Next frame ======= ... etc ... #end #start command: mosframe syntax: mosframe Plot a mosaic frame, i.e. label panel axes if they are positioned at the left side or lower side of the frame. Plot also the name of the axes. The character height for the axis labels is decreased with a factor calculated by the program. This command doe not \ change the position of the current panel. #end #start command: moslxly syntax: moslxly [x y] Set a mosaic to x columns and y rows. The complete mosaic size must be given before this command (f.i. with 'xsize' and 'ysize'). Each panel will have a width of xsize/x and height ysize/y. If the command is given without parameters, it will reset the scales and sizes to the values stored before a call to 'moslxly'. The 'moslxly' command is always the first command to set up a mosaic. #end #start command: mosnext syntax: mosnext Go to the next panel. The order is left to right and upper to lower. #end #start command: mosprev syntax: mosprev Go to the previous panel. The order is right to left and lower to upper. #end #start command: mosxy syntax: mosxy x y Set current panel to column x and row y. The values for x and y start with 1 which corresponds to the panel in the lower left corner. The default, after a call to 'moslxly', is a panel in the upper left corner, where x is 1 but y is equal to the number of rows that you entered in 'moslxly'. #end #start command: move syntax: move x y Move the current pen position to the position (x,y). The position can be interpreted as grids, mm or physical coordinates. example: move 20 30 ! Move to world coordinates (20,30) ! in millimeter mode: (20,30) mm IF A SET IS SPECIFIED: move PC ! Move to projection centre in set move AC ! Move to axis centre in set (naxis/2-crpix) move * 10 12 8 * -67 8 9.6 ! Move to RA 10h12m8s, DEC -67d8m9.6s ! in the epoch found in the header move *2000.0 10 12 8 *2000.0 -67 8 9.6 ! Same as above but now for Epoch 2000.0 move U 45.323 U 30.322 ! Move to physical position 45.323, 30.322 ! DEGREE move G 45 G 45 ! Move to this galactic lon, lat in degrees move E 45 E 45 ! Move to this ecliptic lon, lat in degrees move S 45 S 45 ! Move to this supergalactic lon, lat in deg. move 30000 M/S U 45 ! A velocity and a number in axis units note: If the subset dimension was 1 (only one axis specified), the physical coordinate will be converted for that axis (whatever its orientation will be). #end #start command: overbox syntax: overbox Get a default box for an overlay set so that this set fits into the box that was used by the previous set. note: The box is calculated using physical coordinates. Therefore, projection and rotation are important. However the program assumes that the rotation and projection are the same for each set and does not check this explicitly. example: inset set1 levels 2 4 6 box frame contours inset set2 !Load a set overbox !Set a default box to fit overlay overlay on !Adjust scales automatically contours #end #start command: overlay syntax: overlay , overlay on, overlay y -Start overlay mode overlay off -Return to previous scales and offset note: For an overlay over an image displayed in GIDS see at 'gids' example: inset set1 levels 2 4 6 box frame contours inset set2 !Load a set box -30 -30 30 30 (or use overbox) overlay on !Adjust scales automatically contours #end #start command: page syntax: page note: Advance to a new (sub) page, clearing the screen. PAGE does not change the window or the position of the viewport relative to the (sub-)page. #end #start command: pattern syntax: pattern x1 ... x8 The parameters are 8 numbers which set a new line style pattern. The numbers consist of 4 pairs. The first number of each pair is the number of dots that must be plotted and the second number is the number of dots that must be skipped. The line style is reset with command 'lstyle 1'. The parameters are floating point numbers > 0 examples:The patterns of the default line styles: dashed: pattern 10::8 dot-dash-dot-dash: patt 8 6 1 6 8 6 1 6 dotted: patt 1 6 1 6 1 6 1 6 dash-dot-dot-dot: 8 6 1 6 1 6 1 6 #end #start command: pause syntax: pause (Continue after pressing carriage return) note: Pausing can be useful if you want to execute a macro but also want for example to change the color lut just before a 'getlut' command. #end #start command: pgframe syntax: pgframe [string1 tick1 sub1 string2 tick2 sub2] string1: string of options for horizontal axis tick1: world coordinate interval between major ticks in X If tick1=0.0, the interval is chosen by the program sub1: number of sub intervals to divide the major coordinate intervals into. If sub1=0, the number is chosen by the program (also if tick1=0.0). string2, tick2, sub2: same as above but now for y axis string consists of characters: A: draw Axis (X axis is horizontal line Y=0, etc.) B: draw Bottom (X) or left (Y) edge of frame C: draw top (X) or right (Y) edge of frame G: draw Grid of vertical (X) or horizontal (Y) lines I: Invert the tick marks; i.e. draw them outside the viewport instead of inside L: Label axis logarithmically. The major tick interval is always 1.0. The numeric label is 10**(x) where x is the world coordinate at the tick mark. If subticks are requested, 8 subticks are drawn between each major tick at equal logarithmic intervals. N: write Numeric labels in the conventional location below the viewport (X) or to the left of the viewport (Y) P: extend ('Project') major tick marks outside the box (ignored if option I is specified. M: write numeric labels in the unconventional location above the viewport (X) or to the right of the viewport (Y) T: draw major Tick marks at the major coordinate interval S: draw minor tick marks (Subticks) V: orient numeric labels Vertically. This is only applicable to Y. The default is to write Y-labels parallel to the axis note: There are defaults for the arguments. But you cannot omit them in a random order. So if you want to specify only the number of subticks along Y, you have to give the other arguments too! example: pgframe ! same as pgframe BCNST 0.0 0 BCNSTV 0.0 0 #end #start command: pgviewport syntax: pgviewport xlo ylo xhi yhi (all in mm) note: Change the size and position of the viewport, specifying the viewport in mm in each dimension. The viewport is the rectangle on the view surface through which one views the graph. Most of the plot routines truncate at the edge of the viewport. The region of world space (the coordinate space of the graph) which is visible through the viewport is set by 'box' or 'xrange' and 'yrange'. It is legal to request a viewport larger than the view surface. Only the part which appears on the view surface will be plotted. The default viewport is the entire device. #end #start command: playback syntax: playback [device] example: playback ! Re-execute stored commands on current device playback xterm ! Re-execute stored commands on device xterm playback ? ! playback, but prompt with GRDEVICE= first #end #start command: plotinfo syntax: plotinfo #end #start command: points syntax: points Routine to draw Graph Markers (polymarker) at coordinates in xcolumn, ycolumn. They are drawn using the current values of attributes color-index, line-width, and character-height (character-font applies if the symbol number is >31). If the point to be marked lies outside the window, no marker is drawn. note: Blank values are not plotted! #end #start command: polmode syntax: polmode R/D If the mode is set to R (default) the angles read from 'polset' are in radians. If the mode is set to D the angles are in degrees. #end #start command: polplot syntax: polplot [gridmask_x, gridmask_y] [iscale] gridmask_x/y are integers, iscale is a float Plot at predefined grid positions polarisation vectors with lengths set by data from 'inset' and with angles set by data from 'polset'. Data in 'inset' is scaled by 'iscale'. This is a number that scales the maximum intensity to the size of one pixel. If your maximum is Imax then iscale = 1/Imax will scale all vectors so that the longest fits into one pixel. If 'iscale' is omitted, a default will be calculated. Vectors will be plotted only on those integer grid-positions where the grid can be divided by gridmask_x in the x direction and gridmask_y in the y direction. note: See also 'polmode' and 'polset'. #end #start command: polset syntax: polset set [subset(s)] Read angles of polarisation vectors from this set. Whether the angles are read as radians or degrees depend on 'plotmode'. #end #start command: poly syntax: poly Shade the interior of a closed polygon. The action of this routine depends on the setting of 'fastyle' If Fill-Area Style is 1 (SOLID, the default), the interior of the polygon is solid-filled using the current Color Index (colour). If Fill-Area Style is HOLLOW, the outline of the polygon is drawn using the current line attributes (color index, line-style, and line-width) note: If one of the arrays xcolumn or ycolumn contain blank values, plotting is aborted! #end #start command: pplot syntax: pplot pplot is a macro that generates keywords to specify the profile that you want to plot. An internal loop allows you to create mosaics of profiles. There is also a keyword to store calculated profile coordinates (if possible physical coordinates) and the corresponding profile values to disk. At the end of the loop you are asked to quit GPLOT or to stay in command mode. note: Most important ingredients are the commands: inset profile profint profdata profaxis bp profaxis tw profinfo #end #start command: profaxis syntax: See command 'axis'. Draw an axis, just like the 'axis' command, but be sure that the plotted axis is the profile axis. This is not always the case with the usual 'axis' command because this command depends on how 'inset' is used. note: Command has effect only after 'profile' is used. It is not necessary to use 'profaxis' if the 'inset' command specified a class 2 input (e.g. inset n3198h freq). In that case it is obvious which axis is the profile axis #end #start command: profdata syntax: profdata This command actually assembles the profile data and stores it in the x/ycolumns and the excolumn. Also a string with profile information is created. This string is printed with command 'profinfo'. 'xcolumn' contains sample coordinates in the profile in grids. 'excolumn' contains the physical equivalents of the grid positions in units as found in the header (CUNITn, n=1,2,..), and 'ycolumn' contains the profile data in units given by the header (BUNIT). #end #start command: profile syntax: profile x1 x2 .. xn y1 y2 .. yn or profile x1 x2 .. xn or profile (which generates a keyword prompt) The input depends on the input at 'inset'. For class 1 input (subset definitions), two profile positions must be entered to define a start- and an end point in the subset. For class 2 input (a profile axis is defined, e.g. inset n3198h freq 3:100), a position must be defined. The dimension of the vectors n, is the dimension of the subset that you defined. If arguments are omitted, you get a PROFILE= keyword with a message in which a position or a range is prompted e.g. 'Give profile from (RA1,DEC1) to (RA2,DEC2):' or 'Give position in (RA,DEC): Only the first input method allows you extract your profile in ANY direction in your (sub) set. Between the two profile positions a line is calculated and all grids on this line are used to get the corresponding image value. The image values are stored in the array 'ycolumn'. If the profile is aligned to one of the subset axes, 'xcolumn' will contain the grids along this axis, else, 'xcolumn' will contain the numbers 0 to number of points in profile minus one. The profile axis must be plotted with command 'profaxis' instead of 'axis'. The arguments can be the same as in 'axis'. note: The data is copied to xcolumn and ycolumn ONLY AFTER COMMAND 'profdata'. Between these commands, you can use command 'profint' to set the integration sizes. #end #start command: profinfo syntax: profinfo Plot at current pen position the profile information that was obtained after command 'profdata'. It contains the profile definition (position or range) and the integration sizes (abbreviated as int.) if any are defined with 'profint'. #end #start command: profint syntax: profint [integration sizes] If profint is given without parameters, then a prompt will be generated. The contents will depend on the way that 'inset' fixed your profile. If a profile specification aligns a profile with one of the axes in a set, then integration is possible in all remaining directions of that set. If you know beforehand in which directions integration is possible, then you can give the integration sizes as command parameters. The numbers that you enter are sizes of a box centered around a profile position according to the formulas: gridlo = cpos - PROFINT/2 and gridhi = cpos + PROFINT/2 example: inset AURORA f ! AURORA is RA-DEC-FREQ set. Profile is in frequency profile 0 0 ! Profile starts at RA=0, DEC=0 profint 2 4 ! Integrate over 3 pixels in RA, 5 pixels in DEC #end #start command: quit syntax: quit (or stop) note: To abort the program use 'quit' or 'stop'. To send a plot without quitting GPLOT, use 'closeplot'. #end #start command: read syntax: read macroname [filename] example: read house ! Create macro 'house', and ! read input from 'house.mac' read stars /dj2/users/me/local.txt ! Start macro stars ! input from 'local.txt' note: Start a macro in execute mode by typing the name of the macro The macro name must be an unique name, i.e. it should not get the name of an existing command. #end #start command: rectangle syntax: rectangle x1 [units] y1 [units] x2 [units] y2 [units] or: rectangle xlen ylen 1) Four numbers must be supplied. If a set is known, also units can be given. 2) Two numbers must be supplied. The first one is a length in grids corresponding to the length in x-direction. The second is the length in y. example: recta * 2 2 0 * 37 52 0 * 1 59 0 * 38 4 0 ! draw rectangle from: ! RA=2h2m0s, DEC=37d52m0s to ! RA=1h59m0s, DEC=38d4m0s recta -900 km/s -10 900 km/s 10 ! draw rectangle from: ! x1=-900 km.s y1=-10 (grids) to ! x2=900 km/s y2=10 (grids) rectangle 100 30 ! length 100 grids in x, 30 in y #end #start command: reset syntax: reset #end #start command: setinfo syntax: setinfo #end #start command: subset syntax: subset index index is a subset index number. The first number is always 0. The maximum number is (number_of_subsets-1). #end #start command: status syntax: status note: See DEVINFO for plot status (device characteristics etc.) #end #start command: storelut syntax: storelut Store all colour information obtained with 'getlut' and GIDS in a table in the header of the set given in 'inset'. The information is retrieved with 'getlut header'. The table is stored at the subset level given in 'inset'. #end #start command: symbol syntax: symbol n n == -1 ! Draw a dot of the smallest possible size. 0 < n < 32 ! Draw plot symbol from table in PGPLOT manual n > 32 ! Plot corresponding ASCII character as marker #end #start command: stop syntax: stop (or quit) note: To quit the program use 'quit' or 'stop'. To send a plot without quitting GPLOT, use 'closeplot'. #end #start command: task syntax: task taskname keyword1=val1 keyword2=val2 keyword3=val3, ...... Spawn a task that reads the keywords as entered in the keyword list (list after the task name). example: task COMBIN RESULT01=ifgt($2,3.0,$1,blank) RESULT02= SET01=u9211-2dim 1 SET02=u9211-2dim 8 SETOUT01=temp BOX01= BOX02= #end #start command: termlen syntax: termlen [n] Length of error bar terminals as multiple of the default length. If termlen equals 0.0 no terminals will be drawn. If n is omitted, the current value is displayed. #end #start command: text syntax: text string 'string' is a text string to be plotted at the current pen position. The text is plotted with angle and justification as specified in 'angle' and 'justificat'. Also the text attributes apply. A string entered on the COMMAND LINE can only include semicolons(;) and equal characters(=) if the string (or these characters) are escaped with a back-quote(`) character. If you want to include leading spaces in your string, substitute a '@' character for each space that you want to include. The text can also include special characters/symbols. These (Hershey) symbols are represented by a number between parentheses, prefixed by a backslash. Text can also contain an expression. Expressions are enclosed between brackets '{}'. Between these brackets there can be either the expression or a format string followed by a comma followed by an expression. This expression is either a mathematical expression or a '#' character followed by a number. This number indicates the number of the axis outside the current subset for which a physical coordinate must be returned. The first non-subset axis is #1, the second is #2 etc. These notes apply for all text commands like x/ylabel etc. For an overview of formats use: help formats example: text NGC841 ! nothing special text H\\d2\\uO ! 2 in subscript text \\(0274) ! Draw a copyright symbol text `x=3;` ! Text with '=' and semicolon must be escaped with back quotes text Values at theta {fffff.fff,pi/2} text Velocity is {ffffff.ff,#1} km/s See GPLOT manual for special characters and symbols note: If text is read from a command file, then it is not necessary to use back quotes. In fact, back quotes will be part of the string then. #end #start command: ticksize syntax: ticksize [x] x is a number in mm. If x is omitted, the current value is listed. #end #start command: tomm syntax: tomm x y x and y are world coordinates that are transformed to to mm. The values are written in the log file #end #start command: toplabel syntax: toplabel string(s) example: toplabel Vel (Km/s) The labels are plotted according to fixed angles and justification. note: If the default positions calculated by the program are not suitable, use command 'text' instead. #end #start command: toworld syntax: x y x and y are coordinates in mm that are transformed to to world coordinates The values are written in the log file #end #start command: ulocation syntax: ulocation [x] [y] x and y are numbers in world coordinates that indicate the offset from the lower left corner of the current viewport (=0,0 mm). If both numbers are omitted, the current offsets are displayed in mm. note: For absolute offsets (in mm), use the 'location' command. #end #start info: units table: ======== Units recognized by GIPSY ======== DEGREE ARCSEC ARCMIN RADIAN CIRCLE DMSSEC DMSMIN DMSDEG HMSSEC HMSMIN HMSHOUR METER ANGSTROM NM MICRON MM CM INCH FOOT YARD M KM MILE PC KPC MPC TICK SECOND MINUTE HOUR DAY YEAR HZ KHZ MHZ GHZ M/S MM/S CM/S KM/S K MK JY MJY TAU #end #start command: va Also vb, ..., vz syntax: See at command 'xcolumn' note: In GPLOT you have 26 vector variables with names va, vb etc. These vectors behave in the same way as the special vectors 'xcolumn', 'ycolumn', 'excolumn' and 'eycolumn' but they have no special meaning for plotting etc. they are just arrays for data storage. Available memory determines the maximum length of the vectors. Expressions with these variables are case INsensitive. Expression lengths cannot exceed 1024 characters. Example: va 0:pi:0.1 vb sin(va) ycolumn va*vb clist ycolumn vA vB #end #start command: view syntax: view note: The application VIEW is started. The input set is given by 'inset'. The box is copied from the current box. GPLOT will ask you to supply a CLIP= keyword (belongs to VIEW) #end #start command: world syntax: world note: This command is used after the 'mmeter' command to switch back to the stored box and scales. #end #start command: write syntax: write macroname [filename] example: write house ! write contents of 'house' to 'house.mac' write stars /dj2/users/me/local.txt ! write contents of stars to ! /dj2/users/me/local.txt write main ! write contents of excecute macro ! to 'main.mac' #end #start command: xcolumn syntax: Syntax is the same for xcolumn, ycolumn, excolumn & eycolumn xcolumn filename colnr xcolumn file(filename,column,row-range (Hermes syntax for input from files xcolumn expression-without-variables xcolumn expression-with-variables example: xcolumn radius.dat 3 ! Read third column from radius.dat in xcolumn xcolumn file(gauss.dat,1,8:15) xcol 10**[0 1 5] ! xcolumn values: 1 10 100000 xcol sin(rad(xcolumn)) ! take the sine of each entry in xcolumn note: The variable names are the names of the columns. In an expression you have to specify the generic name like xcolumn, eycolumn etc. The contents of the columns can be listed with 'clist'. This command accepts (abbreviated) column names as arguments. The array contents will be listed in the same left to right order as that the arguments were entered. #end #start command: xlabel syntax: See description at toplabel #end #start command: xmargin syntax: xmargin [mm] Argument is given in mm If value is omitted, the current value is displayed note: For better layout, you often do not want the pixels, as plotted by for instance 'grayscale', intersect your axes. It is possible to enlarge the frame a bit in x and y direction with this command. #end #start command: xrange syntax: xrange xrange lo hi xrange xcolumn xrange ycolumn xrange minmax 'lo, hi' are in world coordinates Command without parameters displays current values. xrange (or yrange) and a column name will set the range to the min and max. value in that column. The column names can be abbreviated to xcol/ycol. If the argument is minmax, then the current values indicating a minimum and maximum as stored in 'minmax' are copied (see . description at 'minmax' to read what can be set by 'minmax'). #end #start command: xscale syntax: xscale [n] [units] xscale without parameters will display the current value. Without units, the scale is in grids/mm With units, the units are physical units corresponding to the axis units (or other units if a conversion is possible). note: If a set is specified with 'inset' and your axes are in units corresponding with the header units, you can also specify the scale in physical units. For example if an axis unit is in degrees, you can give: xscale n1 DEGREE or xscale n2 ARCMIN or xscale n3 ARCSEC or The command help units generates a list with GIPSY units. #end #start command: xsize syntax: xsize [x] If x is omitted, the current value is displayed. This command sets the size in mm for the current range on the x axis. It can be used independent of 'xscale'. #end #start command: ycolumn syntax: see description at xcolumn #end #start command: ylabel syntax: see description at toplabel #end #start command: ymargin syntax: see description at xmargin #end #start command: yrange syntax: see description at xrange #end #start command: yscale syntax: see description at xscale #end #start command: ysize syntax: see description at xsize #end