How to remove the boxes in the contour labels????

Charles Seman Charles.Seman at NOAA.GOV
Fri Jan 16 15:07:17 EST 2009


Mald,

I'm not sure if this might be of some help?  Please find attached a
GrADS script function clabel.gsf which is a script to plot contour
labels interactively. Also attached is a GrADS script fig1ab_sd.gs which
uses clabel.gsf...  If you find this useful, and have questions, please
let me know...
Thanks,
Chuck

some documentation:
...in fig1ab_sd.gs, input parameters for "clabel" (need 3 parameters:
csiz = contour label size, cformat = arithmetic format, and clist =
contour values to plot (here, 4 values in "sd_level"; sd_style defines
contour line style for each contour value in sd_level)):
*
*  Define the contour levels for the sample standard deviation...
*
sd_level = '0.2 0.5 0.8 1.1'
*sd_style = ' 5   3   2   1'
sd_style = ' 1   1   1   1'
*sd_label = 'off'
*sd_label = 'on'
sd_label = 'manual' ; csiz = 0.08 ; cformat = '%3.1f'

...further down in fig1ab_sd.gs, a loop to plot standard deviation
contour line and prompts user whether to label it using "clabel()" (here
contour lines and labels are plotted one-by-one), and after each
contour, prompts user for a replot to retry contour label; goes on to
next contour level if user does not type "yes":

  n=1 ; sd_clev = subwrd(sd_level,n) ; sd_cstyle = subwrd(sd_style,n)
  while ( sd_clev != '' )
    say 'n, sd_clev = 'n', 'sd_clev
    'set gxout contour'
    'set clevs 'sd_clev
    'set cstyle 'sd_cstyle
    'set ccolor 1'
    'set xlab off'
    'set ylab off'
    'set x 1'
    'set y 1 'ny
    'set lev 'zlevs
    'set t 1'
    'd sd'
    if( sd_label = 'manual' )
      say
      say 'Contour level = 'sd_clev
      say 'Do you want to plot a contour label?'
      say 'Type y(es) or Y(es), or press "ENTER" to continue...'
      pull plot
      if( plot='y' | plot='yes' | plot='Y' | plot='Yes' )
        clabel(csiz,cformat,sd_clev)
      endif
      say
      say 'Do you want to replot panel?'
      say 'Type y(es) or Y(es), or press "ENTER" to continue...'
      pull replot
      if( replot='y' | replot='yes' | replot='Y' | replot='Yes' )
        say
        say 'plot zonal and time averaged "'var_name'"...'
        say
        'set gxout shaded'
        'set clevs '_vcl.m1
        'set ccols '_vcc.m1
        'set xlab off'
        'set ylab off'
        'set x 1'
        'set y 1 'ny
        'set lev 'zlevs
        'set t 1'
        'd ztav'
        'set gxout stat'
        'd ztav'
        min_max = sublin(result,8)
        say '   'min_max
        if( plot_min_max = 'yes' )
          xmm = xl_pvar_parea + 0.1
          ymm = yt_pvar_parea - 0.1
          'set string 1 l 4'
          'set strsiz 0.08'
          'draw string 'xmm' 'ymm' Data: 'min_max' '
        endif
        if( plot_min_temp = 'yes' )
          say
          say '   plot level of minimum temperature...'
          say
          j=1
          while ( j <= ny )
            'set y 'j
*           say '      xloc, yloc = 'xloc.j', 'yloc.j
            'set line 1'
            'draw mark 3 'xloc.j' 'yloc.j' 0.03'
            j=j+1
          endwhile
        endif
        n=0
      endif
    endif
    n=n+1
    sd_clev = subwrd(sd_level,n) ; sd_cstyle = subwrd(sd_style,n)
  endwhile



Mald MM5 wrote:
> Hi there anybody,
>
> I have a plot where contour plot is superimposed on a shaded plot.
> There is a box coming with the contour label. However, I want the box
> to be removed and keep the label only. How do I achieve this?...
>
> Thanks
> Mald
>
>

--

Please note that Charles.Seman at noaa.gov should be considered my NOAA
email address, not cjs at gfdl.noaa.gov.

********************************************************************
 Charles Seman                                Charles.Seman at noaa.gov
 U.S. Department of Commerce / NOAA / OAR
 Geophysical Fluid Dynamics Laboratory         voice: (609) 452-6547
 201 Forrestal Road                              fax: (609) 987-5063
 Princeton, NJ  08540-6649            http://www.gfdl.noaa.gov/~cjs/
********************************************************************

"The contents of this message are mine personally and do not necessarily
reflect any position of the Government or NOAA."

-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: clabel.gsf
Url: http://gradsusr.org/pipermail/gradsusr/attachments/20090116/0ccad345/attachment.pl 
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: fig1ab_sd.gs
Url: http://gradsusr.org/pipermail/gradsusr/attachments/20090116/0ccad345/attachment-0001.pl 


More information about the gradsusr mailing list