GRAMON_PGPLOT

 

Introduction 1

Plot options 2

Basic 2

Axis and plot format 2

Line styles 3

Profile options (for an analyzing spectra) 3

Line and string options 4

Data IO 4

Simple plot manipulation. 5

History mechanism 5

 

Introduction

 

Basic plotting subroutine which is option driven. Basic calling method can be seen in PLT_SPEC or DISPGEN. Package has a lot of options for making pretty plots. At present it does not allow multiple panels on the same page. This is not a limitation --- postscript files can easily be combined to give a panel format either by editing, or by running simple scripts (programs). n_col_merge.exe, land_col_merge.exe, n_multi_merge.exe & land_multi_merge.exe are fortran programs designed to facilitate plot merging. .sve files are not utilized by GRAMON_PGPLOT.


Data is passed to GRAMON_PGPLOT by calls of the form

     CALL DP_CURVE(NPTS,XVEC,YVEC)

or similar variants. Up to 50 plots, of ÒarbitraryÓ length, can be passed. Error bars can also be passed. The plot package is called by

         

     CALL GRAMON_PGPLOT(XLABEL,YLABEL,TITLE,OPTIONS)

 

All arguments are CHARACTER, and may be blank.

 

Basic philosophy is that plot package should provide reasonable default plots. These defaults can then be modified to make pretty plots. Once the user is a happy with a plot, it can be written to a hard file using the Z option. For pretty plots with strings, it advisable to set an explicit aspect ratio (the default aspect ratio is device dependent). When this is done, the hardcopy plot should look identical to that on the screen(except for the vagaries of color).



Plot options

Basic

H     Help

P     Plot graphs (default)

NOI   Leave data intact on exit (actually a switch). Default is to destroy data on exit. Make sure to cancel VEL option before issuing this command.

E     Exit from PLOT package

 

CL    Clear Graphics Screen

LP    Long plot. This adjusts the plotting window with the device CPS so that long plots (e.g., 2m) can be produced. When the resulting postscript file is converted to PDF, the can be easily scrolled.

LOC   Use cursors to read of (X,Y) positions on a graph. On many systems you need to hit Mouse button 1 (MB1) to activate the plot window and hence the cursor (this may also be necessary after every output to the terminal). Use ÒaÓ or ÒMB1Ó to read the cursor position, and ÒxÓ or ÒMB3Ó to exit.      

Z     Hardcopy (ZN=Asks for new hard device). Plots are automatically numbered as pgplot_1.ps pgplot_2.ps etc, although the file name can be changed.

 

Axis and plot format

A     Define basic axis Parameters (Xstart, Xend etc)

2A    Define parameters for axis on right hand side.

F     Change default axis parameters

L     Modify Axis Labels and Titles

N     Set aspect ratio of plot. Change size of labels, tick marks, and plot borders.

LX    Switch between LINEAR/LOG X axis labeling.

LY    Switch between LINEAR/LOG Y axis labeling.

LXY   Switch between LINEAR/LOG labeling for X and Y axes.


 

 

Line styles  

B     Switch error bars on/off

C     Indicate how curves are to be connected

             L  Normal line

             E  Non-monotonic

             EC Non-monotonic – switches color

             B  Broken

             I  Invisible

             V  Vertical lines

             VB Vertical lines – sets base for vertical lines.

             A  Histogram - X vert

             H  Histogram

             LG Plots Log(ABS(Y)) – Use with –ve marker style.

CC    Change color settings

CP    Change pens (Color Index)

D     Switch dashed lines on/off

DE    Edit dashed lines one by one

W     Change thickness (line weights) of curves.

         If w(1)is –ve, all curves set to ABS[w(1)].

WE    Edit line weights one by one

M     Switch marking of data points on/off

RPO   Plot curves in reverse order (switch): does not affect color.

OFF   Set offsets when plotting multiple plots.

Profile options (for an analyzing spectra)

DC    Define a straight line continuum for EW

EW    Measure the EW or AREA of a single line in a plot. If the continuum has not been previously defined, the continuum is assumed to be normalized to unity.

GF    Fit a set of Gaussians (with an exponent not necessarily=2)to a section of normalized spectrum. The parameters of the Gaussian, and the EWs are output. Rerunning GF allows previous fit parameters to be used/edited.

MGF   Fit multiple plots with Gaussians. Use GF on a representative plot to first define approximate parameters of fit. This option will then fit multiple data sets that have been read into the plot buffer. NB: DonÕt forget that the BOX option can be used to read in multiple file to PLT_SPC.

DG    Draw the Gaussian fits (in black) (allows the plot screen to be cleared an updated.


 

 

Line and string options

VC    Define line vectors on the plot using cursor control.

VF    Read vector definitions from a file.

VE    Online edit of vectors (colors, size, location etc).

SC    Define strings on the plot using cursor control. String location is done by the numeric keypad (1 to 9).

SF    Read string definitions from a file.

SE    Online edit of strings (colors, size etc).

Data IO

RID   Read line IDÕs from data file created using DISPGEN (option LNID). This can be then used to automatically identify lines on plot. Only reads line for current plot window (not whole spectrum). Works best in optical where there are relatively few lines. Use SID to change defaults. Plot should be normalized.

RP    Read plots from a (WP) direct access file. WP and RP are useful to transfer plots between different programs or models. This option and WP can be used to compare plots from different models. RUN DISPGEN in two windows, and use these options to transfer data between the programs. On program can open a null window for plotting.

RPF   As for RP but file name can be changed.

      WXY   Write a simple ascii data file in column format

WP    Write plots to a direct access file. Plots are labeled, and these labels are subsequently used by RP to access the plot.

WPF   As for WP but file name can be changed. 

RXY   Read a simple data file that is in ascii format.

SXY   Writes ascii format in column format with id, I, and x(i), y(i) given sequentially for all plots.


 

Simple plot manipulation.

NM    Normalize -- scale plot level to unity, or to match another plot.

LAM   List wavelengths of common lines. Useful for VEL option.

VEL   Convert X axis to use km s-1. Entering 0 will return you to the original input axis.

XAR   Simple X axis arithmetic with a constant (-,+,*,/, R=[const/X], Log, ALOG). The default constant for the R option allows conversion between wavelength (Angstroms) and Frequency (in units of 1015 Hz).

YAR   Simple Y axis arithmetic with a constant (-,+,*,/,R[=1/Y]  Log, ALOG)

VAR   Simple arithmetic on two plots.

 

History mechanism

OLF   Open file to log commands.

CLF   Close log file.

OIF   Open a previously generated log file for input. Cumbersome, as some commands canÕt be used in this mode, and previously issued commands can be important.

CIF   Return to terminal IO.