X-Delivery-Notice: SMTP MAIL FROM does not correspond to sender.
Newsgroups: bit.listserv.sas-l
Date:         Thu, 13 Aug 1992 14:02:09 BST
Reply-To:     "Mike Froggatt" <MJF@IBM-B.RUTHERFORD.AC.UK>
From:         "Mike Froggatt" <MJF@IBM-B.RUTHERFORD.AC.UK>
Subject:      GCONTOUR question

A colleague who does not subscribe to the list has a SAS/GRAPH problem.
I wondered if any kind SAS-Ler has any suggestions.
Thanks in advance for any help.

Mike Froggatt
Rutherford Appleton Laboratory
Oxford, England

------------------------------------------------------------------------

I am producing contour maps using GCONTOUR. I am also trying to overlay a
grid on top of the plot using the HREF and VREF options in the PLOT
statement but to no avail. I have even specified the colour of the lines to
be black to ensure that the grid stands out. I am also using the JOIN and
PATTERN options to produced joined up areas of the same contour level. I
just wonder whether this has any effect on the HREF and VREF lines.

...

Here is the SAS file. I have since found that if you do not specify
PATTERN and JOIN the grid lines are drawn. I am therefore wondering
whether the lines are being overwritten and indeed whether you can have
grid lines if the contour pattern is filled in.
FILENAME GSASFILE 'VNC06 POST H';
filename sitedata 'SITES DATA A';
GOPTIONS RESET=GLOBAL DEVICE=APPLELW
         HANDSHAKE=XONXOFF
         ctext=black
         ctitle=black
         BORDER
         FTEXT=SWISS
         GUNIT=PCT
         HTITLE=3
         HTEXT=2
         GACCESS=GSASFILE
         COLORS=(white grayf0 grayd3  graya7
                   gray7b  gray4f  black);
/* GRID POINT DATA SET VALUES TO CREATE CONTOURS  */
DATA cont;
    infile contdata;
    INPUT x rb4. y rb4. z rb4.;
    IF sqrt((x-255/2)**2+(y-255/2)**2) > 255*7/20
                THEN z=-999.0;
    x=x*20/255+300;
    y=y*20/255+960;
RUN;
/* Read in sites + coordinates */
data sites;
     infile sitedata;
     input projsite $ 1-17 xcoord ycoord;
     put projsite;
run;
/* DEFINE ANNOTATION */
data anno;
    set sites;
    length function style color $ 8 text $ 17;
    retain xsys '2' ysys '2' hsys '1' when 'a';
/* Create observation for a star */
   function='label'; color='black'; size=5; text='M'; position='5';
  style='special'; x=xcoord; y=ycoord;
  output;
/* Create observation for the text */
function='label'; color='black'; size=3;
text=projsite; position='8'; style='swissb';
  output;
run;
/* Define titles */
TITLE1 C=BLACK F=SWISS 'ND06 Normalised Velocity Contours';
TITLE2 C=BLACK F=SWISS 'Mean over all directions';
TITLE3 C=Black f=swiss 'Reference speed=13.81 m/s';
/* Define pattern definitions */
pattern value=msolid;
/* DEFINE ANNOTATION */
LEGEND VALUE=(J=L) LABEL=('Norm. Vel. contours:') ACROSS=3
                    FRAME cborder=black;
/* Define axes */
 axis1 order=(303 to 317 by 2)
       label=(justify=c 'E (km)');
 axis2 order=(963 to 977 by 2)
       label=('N (km)');
PROC Gcontour data=cont;
      plot y*x=z
          /
           levels=0.8 to 1.4 by 0.1
           haxis=axis1
           vaxis=axis2
           cv=black
           ch=black
           ctext=black
           caxis=black
           annotate=anno
           pattern
           join
           href=(303 to 317 by 2)
           vref=(963 to 977 by 2)
                  LEGEND=LEGEND1;
RUN;