Re: Hello

From: wintels@XXXXXX
Date: Thu Apr 11 1996 - 15:18:02 MDT


"I am working with NCAR3.2.1 now in Canadian Center of Climate Modelling and Analysis
I have a problem when I try to draw contour graphs using Conpack. I don't know how to
to make Label of High/Low and Contour Labels thicker. I try to use different fonts and
also try to use different size but it will not work. I guess they were drawn using GTX
or PLCHLQ subroutine internally. The contour graphs I produced using NCAR3.2 can not be
published because the labels shoul be much more thicker in order to be seen in photos.
I was trying to update the plots from NCAR2.0 which using hafton to NCAR3.2 which using
Conpack directly. Can anyone who is familar with the problem give me some help?
Thank you."

The following code might help you. It lets you control a number of contouring parameters
manually. Insert it after setting your co-ordinates and before calling CPRECT.

To control line label line widths, insert the folowing into the loop:

call cpsetr('LLL - line label line width',.5)

Play with the nunber until you get what you want.

For the other one insert the following BEFORE the loop:

call cpsetr('HLL - high/low label line width',.5)

It works for me!
ORE the loop:

call cpsetr('HLL - high/low label line width',.5)

It works for me!

c Set contour variables:
c intvl = contour interval
c rmin = minimum contour level
c rmax = maximum contour level
      ncl = 30
c rmin = 4560.
c rintvl =60.
      rmin = -540.
      rintvl = 30.
      rmin = -300
      rintvl = 20
c rmin = 910
c rintvl = 4.
      rmax = rmin + (ncl-1)*rintvl

c Turn to manual contour selection
      call cpseti('CLS - contour level selection',0)
c Specify number of contours selected
      call cpseti('NCL - number of contour levels',ncl)

c Set every nth contour to bold
      n=1
      nbcl=ncl/n
      do 30 i=1,nbcl
         do 31 j=1,n
            k= j + (n*i) - n
            clv = rmin + (k-1)*rintvl
            call cpseti('PAI - parameter array index',k)
            call cpsetr('CLV - contour level value',clv)
            if(j.eq.n)then
              call cpseti('CLU - contour level usage',3)
              call cpsetr('CLL - contour line width',2.)
              call cpsetr('ILS - informational label size',.02)
              call cpsetr('LLS - line label size',.0125)
              call cpseti('LLO - line label orientation',0)
              call cpseti('LLB - line label box flag',0)
                if(clv.lt.0)then
                  call cpseti('CLD - contour line dash pattern',21845)
                endif
                if(clv.eq.0)call cpseti('CLU - contour level usage',0)
            else
              if(j.eq.2)then
                call cpseti('CLU - contour level usage',3)
              else
                call cpseti('CLU - contour level usage',1)
              endif
              call cpsetr('ILS - informational label size',.017)
c call cpseti('CLL - contour line width',.5)
                if(clv.lt.0)then
                  call cpseti('CLD - contour line dash pattern',21845)
                  call cpsetr('LLS - line label size',.0100)
                endif
              call cpsetr('LLS - line label size',.0100)
              call cpseti('LLB - line label box flag',1)
              call cpseti('LLO - line label orientation',0)
              call cpseti('LLB - line label box flag',0)
            endif
31 continue
30 continue

Happy publishing!!

Werner
wintels@zephyr.meteo.mcgill.ca



This archive was generated by hypermail 2b29 : Wed Jun 28 2000 - 09:45:36 MDT