GPLOT recipes: Contours over a grayscale plot of different origin



There are two GIPSY sets. With the first set (continuumclsm) you want to set the box and the scale and draw contours. With the second set (optrep) you want to plot gray scales. For POSTSCRIPT files, the order is important. You have to plot the gray scales before the contours. Here is a trick which creates a PostScript file of a plot that has a correct spatial aspect ratio:

The GPLOT macro:

device ppsfile/scale.ps           ! PGPLOT device and name of PS file on disk
location 50 50                    ! Set the origin in mm
inset continuumclsm 0             ! Define set/subset
box -50 -35 70 35                 ! Set box before any scaling commands !
xscale -0.08 arcmin               ! Scaling
yscale 0.08 arcmin
inset optrep                      ! The gray scale set
overbox                           ! New box must fit on previous box
overlay on                        ! Calculate new scales
level 1000:14000:60               ! levels for gray scale
grayscale                         ! the gray scales
overlay off                       ! back to the old scales
inset continuumclsm 0             ! Define old set again
box -50 -35 70 35                 ! With its previous box
xscale -0.08 arcmin               ! Scale again with previous scale
yscale 0.08 arcmin
levels 0.05 0.1 0.15 0.2 0.25 0.3 0.4 0.5 1 2 4 8 
colour 0                          ! Set colour to background
contours                          ! plot the contours
colour 1
charhei 3
frame                             ! Draw a frame
close

GIPSY