[Thread Prev][Thread Next][Index]

Re: log contour intervals (==> SHAKEY)

Hi Alice and Mick,

You can control the position, size, number of digits, text size, etc. on the
color bar in Ferret with the PLOT+ "PPL SHAKEY" command.  Immediately below is
the description from $FER_DIR/doc/pplus_enhance_user_guide.txt

    - steve


SHAKEY do_key, orient, klab_siz, klab_inc, klab_dig, klab_len, kx_lo, kx_hi,
ky_lo, ky_hi

This command controls the attributes of the key generated by the SHADE command.
The  key associates the colors or patterns used in the plot with the field
values; its use is optional.  LIST SHAKEY will list current settings of the key.

 do_key If 0 the key will not be displayed; if 1 the key will be displayed.
Default  is 1.

 orient If 0 the key is horizontal (by default on top of the figure); if 1 the
key is  vertical (by default on the right).  Default value is 0.

 klab_siz If non-zero, klab_siz is the height of key label characters in inches.
If 0, SHADE selects a reasonable height; default is 0.

 klab_inc If non-zero every klab_inc key level is labelled; if 0, SHADE selects a
suitable value.  Default value is 0.

 klab_dig is the number of significant digits (klab_dig > 0) or decimal places
(klab_dig < 0) in the key.  Default is 3.

 klab_len is the maximum number of characters in a key label.  Default is 9.

 kx_lo X-coordinate of the left side of the key, in inches.

 kx_hi X-coordinate of the right side.

 ky_lo Y-coordinate of the bottom of the key, in inches.

 ky_hi Y-coordinate of the top.


 SHAKEY 1, 1, 0, 3, 4, 8, 9.4, 10.2, 1.4, 7.4

 Specifies that the SHADE command draw a vertical key with label size selected
automatically and every third color of the key labelled.  Labels will contain 4
significant digits  to a maximum of 8 digits.  The entire key will occupy a
rectangle from (9.4,1.4) to (10.2,7.4) in inches.

SPILLANE@pmel.noaa.gov wrote:

> Hello Alice,
>         I don't see a simple solution to your color key labelling
> problem, unless contouring the (base-10) log of the function is
> acceptable.  The latter might make the setting of your non-integer
> exponents easier in a way.
>         I believe ferret doesn't have the newer plotplus commands
> that customise the colorbar (colorbar,cbaxis,cbfor,cblabp,cblint
> and cbcsze).  If you could turn off the key labels (cblabp) or
> render them with zero height (cbcsze) then you could use "ppl
> %label" or movable labels to put in any values you like. Perhaps
> you can still use this idea by plotting a white polygon to blot
> out the offending key labels
> polygon/i=1:4/pal=blue/nokey/nolab/over xx,yy
> where xx,yy set by ysequence are the coords of the white rectangle.
>         Another workaround would be to drop the key entirely and
> use overlay contours to put correctly labelled contour lines on
> the plot itself.  For your case if you want levels at 1.5x10^n
> where n=-10,-9,-8...-4 say then using a test function 1/10^(i+j+0.5)
> you would (leaving the color bar as a check here)
> fill/i=1:10/j=1:10/lev=(-9.824,-3.824,1) log(1/10^(i+j+0.5))
> ppl conpre,@sr1.5e
> contour/over/i=1:10/j=1:10/nolab/lev=(-9.824,-3.824,1,-1) log(1/10^(i+j+0.5))
> Note the extra "-1" in the contour lev instruction which forces
> integer contour labels.  This in combination with the "conpre"
> results in labels like 1.5e-10.
> Hope this is of some help.
> Mick
> -------------------------------------------------------------------------
> Mick Spillane                            _/_/_/_/ _/_/_/_/  _/_/   _/_/_/
> Phone : (206)526-6780                   _/         _/   _/  _/   _/    _/
> E-mail: spillane@pmel.noaa.gov         _/_/_/     _/_/_/   _/   _/
> U of W Box 357941                     _/         _/       _/   _/    _/
> Room 2070 Building#3 NOAA/PMEL       _/_/_/_/  _/_/     _/_/   _/_/_/

Steve Hankin
NOAA/PMEL, 7600 Sand Point Way NE, Seattle, WA 98115-0070
ph. (206) 526-6080 -- FAX (206) 526-6744

[Thread Prev][Thread Next][Index]

Dept of Commerce / NOAA / OAR / PMEL / TMAP

Contact Us | Privacy Policy | Disclaimer | Accessibility Statement