Документ взят из кэша поисковой машины. Адрес оригинального документа : http://www.atnf.csiro.au/computing/software/gipsy/tsk/cplot.dc1
Дата изменения: Fri Jul 21 11:13:16 2000
Дата индексирования: Fri Jan 16 00:07:23 2009
Кодировка:

Поисковые слова: aurora

Name: CPLOT

Purpose: Create contour-, gray scale- and colour plots.
Provide basic drawing routines.

Category: PLOTTING

File: cplot.c

Author: M. Vogelaar

Keywords:

INSET= Set and subset(s) to work on. Maximum number of subsets
is 256. The dimension of the input must be 2.

BOX= Frame of subset. [whole subset]
Decrease area to be plotted.

GRDEVICE= Plot device: [List of devices]
Destination of plot, Screen or Hardcopy.

MOSAIC= Number of ROWS in a mosaic: [No mosaic]
Keyword is prompted if number of subsets > 1.
This keyword determines the layout of the mosaic.

NEXT= Give for next plot.
If no mosaic is selected but the number of input subsets
is greater than 1, than each subset has its own plot.
will start the next plot.

** CALCMNMX= Calculate min. & max. in box (Y/N): [N]
If CALCMNMX=N the program displays header values
for the minimum and maximum values in the box. If
header values cannot be obtained or CALCMNMX=Y, the
values are calculated.

SCALE= Scale in x & y (units/mm or arcs/mm) [Calculated]
Defaults and units are shown in the message and are
taken to fit the plot on GRDEVICE=.


===== CONTOUR CONTROL =====

** PERCENT= Contours (and gray scales) in % (Y/N): [N]
If PERCENT=Y the contours (and grayscales) are percen-
tages instead of discrete values.

CONTOUR= Give contours (min=..., max=... ): [None]
The contours are given in units of your image,
or percentages.
Maximum number of contours is 128.

** COLIND= Color indices for contours: [Calculated]
If you give more than 0 indices but less than the number
of contours, the remaining indices are copied from the
last one specified.

** CSTYLE= All cont.(S)olid, dash (O)dd or (N)egative [N]
Distinguish contours by dashing the odd or negative
contours.

** CWIDTH= Linewidth for contours [1..21]: [same as LINEWIDTH=]


===== GRAY SCALES =====

GRAYSC= Gray scales: [No gray scale map]
Draw a gray-scale map of the image values.
The gray scales are given in units of your image or
percentages. For each interval a shade is calculated.
Minimum number of scales is 1, maximum is 128.


===== CREATING A COLOUR PLOT =====

COLPLOT= Do you want a colour plot? Y/[N]
A colour plot is made in interaction with GIDS.
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. GRDEVICE=LCPSFILE). See description.


===== CONTROL PHYSICAL COORDINATES =====


** TICK= separation between major ticks in x,y [calculated]
Units are physical units of the axes, except when the
units are 'DEGREE' then the input is in seconds of arc.
If an axis is labeled 'RA' and is unrotated, then the
units are in seconds of time.

** NMINOR= Number of minor ticks between major ticks [Calculated]

** EXTEND= Extend major tick lines in map? Y/[N]

** LINESTEPS= Number of steps in tick lines: [40]
More steps takes more time but result in
smoother lines. Keyword in only asked if EXTEND=Y


===== LAYOUT OF PLOT =====


** MEAGRE= Plot without units and labels: [N]Y
If a plot is wanted without something along the axes,
use MEAGRE=Y

** GRIDMARGIN= Gridmargins in mm in x, y: [0 0]
Grid margin in x, y-direction. If one value is given,
the second is copied from the first one.

** TITLEMARGIN=Title margins in mm in x, y: [Calculated]
Title margin in x, y direction. The defaults
are 10 mm if XTITLE= and YTITLE= are specified.
Otherwise they are 0 mm. If one value is given, the
second is copied from the first one.

** LABELMARGIN=Label margins in mm in x, y: [Calculated]
Label margins for the physical coordinates
along x- and y axis.

** INFOMARGIN= Info margin in mm (x-dir): [Default by program]
Default width for info is 50 mm.

** LINEWIDTH= Line width in plot [1..21]: [1]

** XTITLE= Title along the X axis: [Axis name from header]

** XTPOS= X-title position x,y (mm): [Calculated]

** YTITLE= Title along the Y axis: [Axis name from header]

** YTPOS= Y-title position x,y (mm): [Calculated]

** AXMASK= Mask for ticks & units for axes: [Y Y Y Y Y N N Y y]
Enable(Y)/Disable(N) plotting tick marks (4 axes) and
physical coordinates (4 axes) along lower, right, upper
and left axis. Default is draw tick marks along all axes
and the physical units along the lower and left axis only.
Axes are counted anti clockwise, starting with the
lower x-axis. The last value indicates plotting of ticks
along axes shared by two plots in a mosaic.

COMPOS= Give position for text:
Positions can be given either in grid or physical
coordinates. Default is the previous position.

COMMENT= Comment in plot: [Stop comments]

Before plotting text there are some attributes to set
(defaults are given by the program). Specification is
requested for the axis text and comments. After the
first comment, the keywords are hidden.


===== TEXT ATTRIBUTES =====


** LABELATT= Hght,Wdth,Fnt,Jstf,Era,Angl,Col [calculated]

** COMMATT*= Hght,Wdth,Fnt,Jstf,Era,Angl,Col [calculated]
* is a wildcard for a comment number:
COMMATT1= : attributes for first comment in a (sub)plot
COMMATT2= : " " " second ......
If COMMATT= (without comment number), the effect of all
COMMATT*= keywords is overruled. This keyword is
canceled, so it can be used in a recall file.

** SUBATT= Hght,Wdth,Fnt,Jstf,Era,Angl,Col [calculated]

** GRIDSATT= Hght,Wdth,Fnt,Jstf,Era,Angl,Col [calculated]

** TITLEATT= Hght,Wdth,Fnt,Jstf,Era,Angl,Col [calculated]

** INFOATT= Hght,Wdth,Fnt,Jstf,Era,Angl,Col [calculated]



===== INCLUDING A PHYSICAL SUBSET COORDINATE IN A MOSAIC ====


** PLSUB= Plot phys. coord. of subset in plot? [N]
Keyword can be set if dimension of the set is
greater than 2. (See also SUBNUM= keyword)

** SUBNUM= Plotnumber(s) to exclude plotting phys.coord's: [none]
Exclude plotting the physical coordinate label
in panels given by SUBNUM=
The upper left panel is panel 1.

** DECIMALS= Decimals in phys. coord. of subset: [2]

** SUBPOS= Position of physical sub. coord.: [Calculated]

Enter ONE alternative position for the labels that
mark a subset.


===== PLOT INFORMATION =====


** PLOTINFO= Information in plot? Y/N: [Depends on device]
If the device is a hardcopy device the
default is Y(es) otherwise it is N(o). The text contains
info about contours, grayscales etc. and is located
at the upper right of the plot.

** INFOCOM= Comment in plot info: [No comment]
Plot info can contain user supplied comment.
Keyword is asked in a loop. The loop is aborted with
carriage return. The keyword is hidden only the first
time it requests input.


===== ADDITIONAL FEATURES =====


GRID= Frame with grid labeling Y/N: [Y]
In a mosaic only isolated axes have grid labeling.

MARKPOS= Give marker position(s): [Stop input]
marker. There is a loop over this keyword
(so a recall file can be used here). Exit loop with
carriage return. Maximum number of positions is 512.

MARKER= Graphics markers: [All 2]
You can give as much different markers as there
are specified (valid) positions after the use of
MARKPOS=

** BEAMPOS= Central position of ellipse corresponding to the beam
you want to plot. If you specify a position, the
beam characteristics from the header will be used as
defaults for the next keywords. If the map is not a
spatial map the beam is replaced by error bars.

** BEAM= Beam major and minor axis FWHM in arcsec: [Header values]
If values cannot be found in the header, the
physical value of the grid spacings are taken as
defaults.

** BEAMPA= Position angle of beam in degrees: [Header value]

** BEAMATT= Erase, Separation (mm), Slope (deg), shape: [0,1,45,1]
argument 1) 0 Do not erase box around beam
1 Erase box around beam.
argument 2) Shade lines have a default separation
of 1 mm
argument 3) Default slope of the shade lines is 45 deg.
wrt. major axis.
argument 4) 1 Plot elliptical beam.
2 Plot rectangular beam (IRAS survey,
long slit spectroscopy)

** BEAMNUM= Plot number(s) to plot a beam: [last plot]


===== DRAWING STRAIGHT LINES IN PLOT =====

** PLLINE= Draw line to/from x1,y1 (to x2,y2): [No line]
If two pairs are given, than a line from x1,y1
to x2,y2 is plotted. If only one pair is given, a
line is plotted from the previous end point to this
point.
As soon as one line is defined, the PLLINE keyword
is prompted in a loop and is not hidden anymore.
The loop is aborted with carriage return.

** PLATT= Width, Style, Color: [Calculated]
Attributes for lines:
Width: 1..21
Style: 1..5
Color: 0..15


===== DRAWING ELLIPSE(S) =====

** ELLPOS= Central pos. for ellipse: [abort loop]

** ELLATT= Width, Style, Color: [Calculated]
Attributes for ellipse:
Width: 1..21
Style: 1..5
Color: 0..15

** ELLAXESPA= Beam maj, min (arcs) & PA (deg): [0 0 0]
For maps where one or both axes is not spatial, the
major and minor axes are in pixels.
The rotation angle is in degrees. 0 deg. means that the
major axis is aligned with the declination axis, there
is no correction for the angle in rotated maps.


===== OVERLAY OVER EXISTING IMAGE IN GIDS=====

** OVERLAY= Overlay over existing image in GIDS? Y[N]
Only possible if a set is already displayed in
GIDS. Default for the overlay set is the set name and
subset of the image already displayed in GIDS.


===== OVERLAY OF NEW (SUB)SET(S) =====


** INSET2= See above

BOX2= "

CONTOUR2= "

COLIND2= "

** CSTYLE2= "

GRAYSC2= "

COLPLOT2= Do you want a colour plot? Y/[N]


===== CURSOR INTERACTION =====
( Only working properly in GIDS )

** INTERACTIVE=Purpose is to call an interactive cursor routine to be
able to mark positions in the plot or to get and convert
positions and put the values in the log-file.
P : Plot marker at this position
Q : Quit interactive cursor mode





Description: Among standard ways of presenting astronomical data are
contour and grayscale plots. If a map is represented by
f(x,y), contours are lines of constant f. This requires
the data you want to present with this program must be 2
dimensional. Therefore sets with more than 2 axes need a
subset specification at INSET=. Information about the
syntax can be found in the GIPSY users manual. The names
of the axes can be found with the programs HEADER or DISK.
If only a part of the data need to be displayed, use BOX=
with four arguments to decrease the size. Input can be a
lower and an upper coordinate pair, a coordinate pair and
combination with physical coordinates. See the GIPSY user
manual for the use of physical coordinates. If you want to
display more than one subset of a set (INSET=AURORA F 1:10)
you get each subset on a blank screen or paper (advancing
to a new page or clearing the screen is controlled by the
NEXT= keyword) unless you want to display all the data
in a mosaic. With MOSAIC= you can give the number of rows
in the mosaic. The program calculates the number of columns.
The first plot will be in the upper left corner of the
screen or paper. Each subset in a mosaic will now be
called 'subplot'.


Contours

The contours at CONTOUR= are a series of floating point
numbers given in units of your map. This keyword obeys the
syntax for reals as described in the GIPSY user manual.
This includes the use of expressions also. An example
could be CONTOUR=LOG([10:1000:50]) which is evaluated to
1, 1.77815, 2.04139, 2.20412, ...., 2.98227
Contours will be plotted with the same line width as the
axes of your plot. The blanks in your data are ignored,
making gaps in the contour map. The contour levels can be
given in percentages also. To put input in percentage
mode, select PERCENT=Y. 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
the level 'max'.
The values min, max are the minimum and maximum values of
the data as recorded in the header of the current
(sub)set. If you don't trust these values or if your box is
smaller than the entire (sub)set, use CALCMNMX=Y to
calculate these values. The min and max are also
calculated if PERCENT=Y and no header items DATAMIN and
DATAMAX are found in the header. If plotting more than one
contour, you can select a contour style to distinguish negative
from positive contours, (default CSTYLE=N), or odd from even
contours (CSTYLE=O). If you want all contours to be solid,
use CSTYLE=S. Contours are associated with a color index.
This index is an integer number that corresponds to a
device dependent color. For a color plot you can use in
COLIND= the color indices:

0 Background
1 Default (Black if background is white)
2 Red
3 Green
4 Blue
5 Cyan
6 Magenta
7 Yellow
8 Orange
9 Green + Yellow
10 Green + Cyan
11 Blue + Cyan
12 Blue + Magenta
13 Red + Magenta
14 Dark Gray
15 Light Gray
16-255 Undefined

The number of color indices must be equal to the number of
contours. If COLIND= the indices are calculated by the
program. If at least one value is given but the number of
indices is less than the number of contours, the remaining
indices are copied from the last one specified.
For a black and white hardcopy you can use 0 for a white
contour and 1 for a black contour. This combination is
sometimes used to emphasize the contours in dark regions
of a gray scale plot. If the device is the screen, the
color indices will not be very useful. The width of the
contours is controlled by CWIDTH=. Together with LINEWIDTH=
and PLATT=, these keywords control the width of the lines to
be plotted. The smallest number is 1 the largest possible
number is 21. The CWIDTH= keyword is asked hidden just
before plotting a contour, making it possible to draw
different contours in different widths. The default values
of all the keywords containing widths is 1 if the plotting
device is the screen or 2 if it is a hardcopy device.
Example: CWIDTH=4;3;2;1
The lowest contour has width 4, the highest has width 1.
The semi colons are important here because CWIDTH= accepts
only one number at a time.

** Trick:
If the minimum value 1 is too thick on paper, there is a
possibility to set 'setlinewidth' in your postscript file
to a smaller value

Devices

The destination of the plot is selected with GRDEVICE=
If you give only, you get a list of devices that can
contain for example:

X : Tektronix window on screen
L1LASER : QMS laser printer 1 in landscape mode
P1LASER : QMS laser printer 1 in portrait mode
LCOLOUR : Colour printer in landscape mode
PCOLOUR : Colour printer in portrait mode
NULL : null device (no plot output)

etc...

On some printers it is possible to plot on a transparency
instead of paper. Instructions are obtained at local
system management.


Gray scales

Instead or along with drawing contours, it is also
possible to fill your plot with shades representing the
image values. The shades are given in GRAYSC=. The maximum
number of shades is 128. Again, input values are floating
point numbers and expressions are allowed. The scales are
in units of the map and must be in ascending order.
Example: GRAYSC=2 3.5 8
Image values smaller than 2 are white in the plot. Values
equal to or greater than 2, but smaller than 3.5 get the first
shade of gray, values 3.5 <= f(x,y) < 8 get the second
shade of gray and values >= 8 are black in the plot. The
available number of different shades depend on the
selected device. If PERCENT=Y, the gray scale values are
percentages.


** Hint

If you want to fill contours smoothly with gray scales,
(contours can intersect the 'gray scale pixels')
simulate more pixels by regridding the map. Use REPROJ
with changed grid spacings to achieve this effect.



Color plots

Color plots can be made if you specified color indices for
text or contours and send the plot to a color printer. As
soon as the program knows that you want to use a color
printer, you are also able to print colored pixels instead of
gray pixels. The image data is translated to colors according
to ..........


Layout

A plot consists of a title along the lower x-axis and left
y-axis, a space for labels containing positions in
physical coordinates, a grid margin to reserve space for
plotting positions in pixels, the plot itself and an area
where important information about the plot is displayed.


Titles

The default titles along x and y axes are the names of
these axes as found in the header. Titles can be altered
with XTITLE= or YTITLE= The keywords accept text strings.
A string can contain escape sequences. These are character-
sequences that are not plotted, but are interpreted as
instructions. All escape sequences start with a backslash
character (\).

\u Start a superscript or end a subscript;
\d Start a subscript or end a superscript;
(\u and \d must always be used in pairs)
\b Backspace, i.e. do not advance text pointer after
plotting the previous character;
\\ Backslash character;
\A Angstrom symbol;
\gx Greek letter corresponding to roman letter x;
(Lower case and upper case x give different greek
characters )
\fn Switch to Normal font
\fr Switch to Roman font
\fi Switch to Italic font
\fs Switch to Script font

Like all 'plot' text, the text can contain so called
PGPLOT symbols. Available symbols (~1000) are arranged
according to Hersey's numerical sequence and are listed in
Table B.1 of the PGPLOT manual. Any character can be
inserted in a text string using an escape sequence of the
form \(n), where n is the 4-digit Hersey number.
The positions of the titles are calculated by the program
but can be altered with XTPOS= and YTPOS=. Each keyword
accepts a coordinate pair in mm. The numbers are absolute
positions in the plot. If for some reason there is not
enough space along the axes to place the title, increase
the default values (10 mm in x and y direction) at
TITLEMARGIN= If only one number is given, the y value is
automatically copied from this value.


Position in pixels

Positions along the axes can be in pixels and physical
values. If GRID=Y, each 10th pixel position will be
marked inside the plot box. Default there is no room
reserved in x and y direction so the numbers can spoil
the layout of the plot if contours reach the borders.
But extra space for the grids can be reserved.
This space is controlled by the keyword
GRIDMARGIN= which accepts two numbers for space in x and y
direction. If only one number is given, the y value is
copied from this value. If GRID=N (default) there are
no grid margins.


Physical values

The labels along the axes indicate the physical positions
i.e. if transformation from pixels to physical coordinates
is possible. If transformation is not possible, the
possible reason is mentioned in your log-file. There the
program puts the result of transformation of pixel 0 to a
physical position. Conversion always take place to the
primary axis units as found in the header (CUNIT#). If
there are also secondary units, the program will convert
the pixels to these units. The default separations between
two positions is calculated by the program. A position
label is plotted together with a marker called a Tick. Space
between two are controlled by TICK=. It accepts values for
the x and y direction overruling the calculated default
values. Negative numbers will be converted to positive
numbers. The units are the axis units except if the header
unit was 'DEGREE'. The values are in seconds of arc then.
If an axis is the RA axis of an unrotated map, the TICK=
units are in time seconds. Between two major tick marks
there are minor tick marks. The default number is
calculated by the program. The numbers of minor ticks in x
and y direction can be changed with NMINOR= If you don't
want minor tick marks, use NMINOR=0 0

It is possible to plot labels for all axes, but in most
plots only the lower x axis and the left y axis do have
labels, while the others have ticks only. For a single
plot this is the default labeling. In a mosaic, lines
connecting two 'subplots' have tick marks only. The
decision to plot ticks or labels is made after AXMASK=
The keywords accepts 8+1 entries. An entry is Y or N. The
first four values indicate the plotting of ticks and the
second four indicate the plotting of labels. Default is
AXMASK=Y Y Y Y Y N N Y y
Counting of the axes is anti-clockwise and starts with
the lower x-axis. The last value indicates plotting of
ticks along axes shared by two plots in a mosaic. The
default is Y. If you change this to N, there will be no
ticks on the 'inside' axes of a mosaic.
Space for the labels along both axes is calculated, but
it is not known to the program beforehand how large the
labels along the y axis are going to be. Therefore
sometimes the space between these labels and the y title
is to big. The spacing is controlled with LABELMARGIN=
which accepts two values. The first is the space in mm
in the x direction (for the y-labels) and the second is
the space in the y direction.


Rotated images

Along spatial rotated axes, only offsets are plotted. An
offset is wrt. a point in your map which is pixel 0 if
this pixel is inside the box or the central pixel if
pixel 0 is not in the box.


Scales

The plot is scaled in some way to fit on paper or screen.
First the physical size in mm of the device plot area is
determined. From this number the margins for grids, labels
titles and info is subtracted. This number is divided by
the number of subplots in one of the directions and is
scaled onto the number of pixels in that direction .
After a correction for the grid margin we end up with a
scale in grids/mm. Changing these values can be done with
SCALE= but then the scales are converted to units/mm.
These units are the physical units as found in the header,
only if the units are 'DEGREE', the scale input must be in
ARCSEC/mm then. If both axes have the same units, then the
scales are made equal in both directions.


Plot information

Information about plot characteristics is placed in the
log file and some is also placed in the plot. The keyword
that can be used here is PLOTINFO= which is N for the
screen and Y for other devices. Note that this parameter
also influences the scaling in your plot. Info in the plot
contains items like the object name, the set name, used
box, units, scales etc. It can be extended with a user
supplied comment in INFOCOM= which is asked in a loop that
is aborted with carriage return. The info is closed with a
time stamp which is also placed in the log file so that
you're always able to find the corresponding information
in the log-file (GIPSY.LOG).


FEATURES

Marking of positions

Positions in a plot can be marked. The positions are taken
from MARKPOS= The keyword is asked in a loop and canceled
after each specification. In this way it made suitable for
using so called recall files. Example: MARKPOS=
and mypos.rcl contains:

* 29 30 45 * 4 10 40
* 29 30 30 * 4 10 0
......

Each physical position in the recall file will be marked
as long as it is contained in BOX= Maximum number of
positions is 512. Each position is marked with a symbol as
selected with MARKER= Such a symbol is called a Graph
Marker and is associated with a symbol number. The symbol
number can be: -1 to draw a dot of the smallest possible
size; 0-31 to draw any one of the symbols in figure 4.1 of
the PGPLOT manual; or 33-127 to draw the corresponding
ASCII character. Examples of symbols are:

1 dot
2 plus
3 star
4 circle
5 cross
6 square
.. .....
17 small circle filled up
28 Arrow Left
29 Arrow Right
30 Arrow Up
31 Arrow Down

Markpos accepts at most the same number of symbol numbers as
there are positions given within the box (this number is
displayed in the log file). The keyword is not asked in a
loop, so no recall file can be used. For different symbols
you can use the repeat facility like MARKER=2::100 8::50 10
(first 100 positions in symbol 2, next 50 in 8 and what is
left all in symbol 10).


Beam

The process of drawing a beam in your plot is started with
the keyword BEAMPOS= which accepts a coordinate pair
either in pixels or in physical units. Default, the
program reads the FWHM's and position angle from the header
and calculates the minor and major axis of the beam by
dividing the header values (degrees) by 3600 to get a
value in seconds of arc. The FWHM is read from header
items BMMAJ and BMMIN and the angle (in degrees wrt the
north) from BMPA. However if the items are not found in
the descriptor, you are prompted to give the values
yourself. If you want to overrule the defaults use BEAM=
for major and minor sizes in seconds of arc, and BEAMPA= for
the position angle in degrees. The beam is shaded with
straight lines with default 1 mm separation and with an
angle of 30 degrees wrt the major axis. Keyword BEAMATT=
accepts four values: first value is the 'erase' variable.
Default it is set to 0, and nothing happens with the beam,
but when it is set to 1, the area in a box containing the
beam will be erased with the background color. On screen
however you will see the outline only. The second value
is the line separation in mm and the third value is the
angle in degrees. You can get a rectangular shaped non-shaded
beam (IRAS survey, long slit spectroscopy) if the fourth
parameter is 2 (default 1 = elliptical).

Default, the beam in a mosaic is plotted in the last subplot,
but this can be altered with BEAMNUM= which accepts at most
the maximum of subplots integer numbers. Subplot 1 is the
upper left plot.

If the map is not a spatial map, the beam is replaced by
error bars. The default lengths will be the grid spacing
in units as found in the header.


Plotting the physical value of the subset

If the set has more than two axes, and a coordinate
transformation is possible, you can print the physical
value of a subset in the plot. For this you use PLSUB=Y
The number of decimals to be printed is controlled by
DECIMALS= which has default 2. The default position is
somewhere in the upper left corner, but if you want a
different position, use SUBPOS= with a position in pixels
or physical coordinates. The position of the text applies
to all the subsets in a mosaic. The units are the units as
found in the header. If there is a secondary axis defined
in the header, the units that correspond to that axis are
used. The units are returned to your log-file.


Comments in plot

With keyword COMMENT= you can put strings in your plot.
The keyword is prompted only if previously COMPOS= was
defined. As with other positions, COMPOS= expect you to
give a coordinate pair either in pixels or in physical
coordinates. A loop is started now. For each specification
of COMPOS= there is a COMMENT= prompt. The keyword accepts
the so called Hersey symbols also. The loop is aborted
with COMMENT=. Each comment can be in different
height, width font etc. These so called text attributes
are connected with the text attributes keywords.
The text string can also contain escape sequences. These
are character-sequences that are not plotted, but are
interpreted as instructions.


Text attributes keywords

Input are 7 floating point numbers that control the
appearance of the text to be plotted. The input syntax is:

XXXXXATT=Hght,Wdth,Fnt,Jstf,Era,Angl,Col [x1,..,x7]

More specific:

Hght: Character height
It's a normalized value corresponding to about
1/40 of the height of the plot device.
Wdth: Thickness of chars & lines (1..21):
Fnt: Font type 1,2,3, 4:
1 single stroke "normal" font
2 roman font
3 italic font
4 script font
Jstf: Justification of text: 0=left, 0.5=middle, 1=right
of a given coordinate.
Era: Erase text box first before plotting text.
0 = Do not erase background.
1 = Erase background for the number of characters
found in the text.
n = Erase background for the n characters.
Angl: Angle of text, 0 is horizontal.
Col: Character color, for indices see color indices
above.


Not all text obey these attributes. For example labeling
has its own justification and has no erase option.
Defaults are all determined by the program.

Defaults:
LABELATT=1.0, currentlinewidth, 2, 1, 0, 0.0, currentcolor
COMMATT*=1.0, currentlinewidth, 2, 1, 0, 0.0, currentcolor
TITLEATT=1.0, currentlinewidth, 2, 1, 0, 0.0, currentcolor
INFOATT= 0.5, 1, 2, 1, 0, 0.0, currentcolor
SUBATT= 0.6, currentlinewidth, 2, 1, 0, 0.0, currentcolor
GRIDSATT=0.5, currentlinewidth, 2, 1, 0, 0.0, currentcolor

* is a number from 1 to the number of comments in one (sub)plot
If the number is omitted, each COMMATT= keyword overrules
the current COMMATT*= specification. COMMATT= is canceled
and therefore can be used in a recall file. This option is
used if the number of keywords is greater than allowed for
a default file. Then the attributes can be stored in a recall
file.


Extended ticks

The tick marks can be extended so that they are connected
by curves following the current projection (EXTEND=Y).
The number of points calculated in a curve is determined
with LINESTEPS= Default is 40 points, for a quick look
you can do with less points, but for a quality plot 40
will probably not be sufficient. The extensions of ticks
in other sky systems is not yet implemented.


Drawing lines in plot

To add some free style plotting use PLLINE= The keyword is
hidden but after specification it will be asked unhidden
in a loop that is aborted by PLLINE= The keyword
accepts at most 4 floating point numbers i.e. 2 coordinate
pairs (in pixels or physical coordinates). The action that
follows is the plotting of a line between the two points.
If the keyword appears again and you specify only one
coordinate the line is plotted from the previous last
coordinate to the specified coordinate. An application for
these lines is the indication of zero levels for instance.
The line width, style and color are controlled by PLATT=
The range in width is [1..21], the range in colors is
[0..15] and line style is one from:

1 Full line
2 Long dashes
3 Dash-dot-dash-dot
4 Dotted
5 Dash-dot-dot-dot


Plotting ellipses

ELLPOS= is a position in grids or physical coordinates.
If the keyword is not empty, you start a loop in which
a beam and angle is asked in ELLAXESPA= First value of
this keyword is the major axis, second the minor axis
and the third is the angle in degrees wrt the positive
y axis. The units of the major and minor axes are in
seconds of arc if both axes in the plot are spatial
axes, else, the units are grids. The appearance is
controlled by ELLATT= (see remarks at PLATT=).


Overlays

CPLOT distinguishes two overlays. The first is an overlay
over an existing image displayed in GIDS (for example
displayed with the program VIEW). The hidden keyword
OVERLAY= must be set to YES. CPLOT then, calculates the
defaults needed to fit the overlay. The default for INSET=
will be name and subset of the set that is already
displayed in GIDS. The default for BOX= will be calculated.
The program tries to create a box that is equal (in
physical coordinates) to the box of the currently displayed
set in GIDS. If the overlay box is smaller, everything
outside that box will be erased before the labels are
written. A default scale is calculated so that the
overlay will fit. The rule for a new scale is:

OldGridSpacing
NewScale = OldScale * --------------
NewGridSpacing


There is not a prompt for GRDEVICE= (because the specifi-
cation MUST be GRDEVICE=gids//append). The gridmargins
are both set to zero.

The second type
is an overlay of contours over the existing ones. These
overlays are made possible by asking in the current plot
for a new (sub)set with INSET2= The keyword is hidden so
it must be specified beforehand. If no more overlays are
needed use INSET2= to abort the overlay loop. For each
subset it is possible to create overlays. The program
calculates a box for the new (sub)set so that it is
contained in the original box in physical coordinates.
With the prompted keyword BOX2= you can rearrange these
values. Pixel 0,0 in the original set is transformed to
physical coordinates which are converted to a pixel position
in the new set.
From this point on all new pixels are scaled with new
scales. A new scale is calculated as described above.

There is no check on projection. You have to decide
yourself whether the overlay makes sense or you have to
use the program REPROJ first. The keywords CONTOUR2=,
COLIND2=, and GRAYSC2= are described under CONTOUR= etc.
If you select no original contours and gray scales in a
mosaic, but use INSET2= for a second (sub)set, it is
possible to use different data origins in your mosaic or
use different contours per subset etc.


Colour plots

To create a colour plot, it is not necessary anymore to
use OVERLAY=Y and make a hardcopy of the result in GIDS.
Now you can select a colour option with the keyword
COLPLOT=Y. For the graphics device you have to select
a colour device ( e.g.: GRDEVICE= LCPSFILE (or PCPSFILE,
LCOLOUR, PCOLOUR) ). Now the program wants to know how
to translate the data values of your (sub)set to colours.
You have to use GIDS for this. In GIDS you can view
your (sub)set and set levels and colours to your own
preferences. If you are satisfied with what you see, run
CPLOT COLPLOT=Y and the colour plot can be made. It is
convenient to send the plot first to a PostScript file
(GRDEVICE=PCPSFILE or LCPSFILE) and view the result
with a viewer like 'gs' (Ghostscript) (Tip: do not leave
GIDS while viewing with 'gs'). Together with the INSET2=
keyword, the keyword COLPLOT2= can be used to make colour
plots with different colour characteristics. See also
the remarks about plotting grayscales. If you want to
use your own colour look up table, use the program COLOUR.
It loads a COLOUR Look Up Table in GIDS. The LUT can be
activated in GIDS with the USER button in the COLOR menu.



Notes: WARNING: If you want to use a grayscale map in your overlays,
make sure that this is your first (sub)set. Otherwise a
grayscale map will obscure all previous plotted contours
in a hardcopy.


Examples: Examples of default files:
1) Create contour plot of subset containing
'short observation beam' (data from A. Broeils).
Note the special use of the comment keyword.

linewidth=2
BEAMPOS=
BOX=-80 -80 80 80
CONTOUR= -0.1 -0.05 -0.025 0.025 0.05 0.1 0.2 0.4 0.8
GRAYSC=
GRDEVICE=x
GRID= n
INSET= app 1
SCALE=10 10
tick=360 360
nminor=1 1
markpos=
compos=10 51.8;-31 45;-10 29;-43 49;-70 65;
comment=\(2522);\(2522);fan beam;res. axis;(b)
commatt1=1 2 2 0.5 0 126;
commatt2=1 2 2 0.5 0 -144;
commatt3=1.2 2 2 0 0 36;
commatt4=1.2 2 2 0 0 -54;
commatt5=1.2 2 2 0 1;
xtitle=R.A. - offset (arcmin)
ytitle=Dec. - offset (arcmin)
titleatt=1.5 2
plline=-20 30 10 51.8; -31 45 -20 30;
platt=3;3
labelatt=1.3 2
plotinfo=n

The use of a Hersey symbol is demonstrated in:
comment=\(2522); ....


2) Example of mosaic and use of recall files. There are
five rows in the mosaic.

INSET=clean 1:29:2
BOX=-50 -65 60 35
GRDEVICE=x
PLOTINFO=
MOSAIC=5
LINEWIDTH=1
PLSUB=y
SUBATT=0.8 1 2 0 1
DECIMALS=0
SUBPOS=
PERCENT=n
CONTOUR=-0.48 -0.24 0.24 0.48 0.96 1.44
CSTYLE=
GRAYSC=
GRIDMARGIN=
labelmargin=25 9.1
SCALE=15 15
GRID=
MARKPOS= MARKER=
TICK=60 360
NMINOR=1 1
XTITLE=R.A. (1950)
YTITLE=Dec. (1950)
AXMASK=
BEAMPOS=-48 -63
BEAMATT=
BEAMNUM=2
COMMENT=
COMPOS=;
EXTENDTICKS=
LINESTEPS=
LABELATT=0.8 2
TITLEATT=1.0 2


The file 'opt2460.rcl' contains:

* 7 52 35.8 * 60 29 01
* 7 52 36 * 60 24 00
* 7 51 57.4 * 60 26 12
* 7 51 56.8 * 60 26 17


3) Example use of overlays. De primary set is called
'30' and the overlay is the subset 'dtotal.new 1'
(data: A. Szomoru).


axmask=
markpos=;
BEAMPOS=45 -65
beampa=-98.50
beam=74.79 58.58
BOX= 30 -75 100 -25
BOX2= 30 -35 50 -22
CONTOUR2=0.005 0.01:0.06:0.01
contour=
GRAYSC=2 5:20:5
graysc2=
GRDEVICE=x
GRID=n
INSET=30
inset2=dtotal.new 1 ;
LINEWIDTH=3
MARKER=
PERCENT=
SCALE=3 3
CSTYLE=
titleatt=1.5,3
labelatt=1,3
xtitle=R.A. (1950)
ytitle=Dec. (1950)
xtpos=109.208405 10
titlemargin=20 20
markpos=;
compos=;


Plotting more overlays is achieved with more (sub)sets in
INSET2=. For instance use '1005' as primary data and
'warpleft 1' and 'warpright 1' as overlay subsets.

........
BOX= -280 -190 230 210
BOX2= 30 -35 50 -22;30 -35 50 -22;
CONTOUR=
contour2=0.002;0.002;
GRAYSC=6.69 17.49 43.94 110.4
graysc2=; ; ;
INSET=/dt1/arpad/bootes/1005
inset2=warpleft 1 ;warpright 1;
........

Note the use of semi colons in the file.


4) Example of using the color indices. The first 5 contours
(in the dark regions of the gray scale plot) are white
and the remaining contours are black.

INSET=velo 1
BOX=-60 -50 50 30
GRDEVICE=x
MOSAIC=
PLSUB=
DECIMALS=
SUBPOS=
PERCENT=n
LINEWIDTH=2
CONTOUR=3650:4100:50
COLIND=1::5 0
CSTYLE=
GRAYSC=3620:4100:10
graysc=
PLOTINFO=
GRIDMARGIN=
SCALE=5 5
GRID=
MARKPOS= MARKER=
TICK=20 360
NMINOR=1 2
XTITLE=R.A. (1950)
YTITLE=Dec. (1950)
AXMASK=
xBEAMPOS=-55 -45
BEAMPOS=-170 -140
BEAMSHADE=
COMMENT=NGC 5533
COMPOS=-170 80;
TEXTATT=;1.3;1.5 2 2 0;1.5
INSET2=;


5) Example offset axis and the use of PLLINE= to draw
offset axes in the plot. The contents of the used
recall files is displayed also.


AXMASK=
BEAMPOS=
BOX= -30 14 30 40
CONTOUR= -1 -0.5 0.5:2:0.5
GRAYSC=
GRDEVICE= x
GRID=n
INSET= 19slice dec 0
LINEWIDTH=3
gridmargin=0 0
PERCENT=
SCALE=
CSTYLE=
box=-30 14 30 40
markpos= marker=17;
titleatt=1.5,3
labelatt=1,3
markpos=;
compos= commatt1=2,3,1,0.5,0,0,1
commatt2=2,3,1,0.5,0,0,1
comment= xtitle=Offset along major axis (arcsec)
ytitle=Heliocentric velocity (km/s)
titlemargin=20 20
plline= platt=

Contents of the used recall files:

xvrot.rcl: (positions of markers)
-11.3636 33.74362
-10.2272 33.68168
-9.09090 33.58433
-7.95454 33.47814
-6.81818 33.31
.....
11.36363 22.98256
;

compos.rcl: (positions of comments)
-4.59 14
4.59 14
;

comment.rcl: (Hersey symbols as comments)
\(2262)
\(2262)

plline.rcl: (physical- and grid coordinates are mixed)

0 14 0 40
u 229.286 u 14234.2 u 229.248 u 14234.2
14 17 18.5455 17
16.273 16 16.273 18

platt.rcl: (attributes for the lines, width, style, color,
two lines in long dashes, two lines in full)
1,2,1
1,2,1
3,1,1
3,1,1





Updates: Feb 12, 1992; VOG, new release (3.0), physical units,
rotated images.
Mar 18, 1992; VOG, new release (3.1), more extensions,
documentation.
Jan 04, 1994; KGB, bug in plotting overlays repaired.
May 19, 1994; VEH, SUBNUM= keyword added.
Feb 14, 1997; VOG, Bug SUBNUM= removed
Mar 05, 1998; VOG, Bug in call to new beam routine
removed.
Nov 19, 1998; VOG, PGCOLIM replaced by PGIMAG (PGPLOT 5.2.0)
Nov 20, 1998; VOG, Replaced pggray2_c by local pggray2
routine that calls standard PGGRAY