[Thread Prev][Thread Next][Index]

Re: Rw: Re: Discontinuous color table...



Hi Ed,
This can be done using the LABEL command in a script which
loops over the points and tests the variable values, putting a one-
character label on the plot if the value is in the given range.  I've
made a quick example showing this.  The script labelx.jnl is below.
In this example, the label is at the grid cell center. (And note it's
slow to run).

For example, to call the script:

use coads_climatology
let sst1 = sst[l=1]
shade/x=241:259/y=15:31 sst1   ! just for comparison
repeat/y=15:31 (go labelx sst1 241 259 `y` 15 16 "@AS1")
repeat/y=15:31 (go labelx sst1 241 259 `y` 16 17 "@AS2")
repeat/y=15:31 (go labelx sst1 241 259 `y` 17 18 "@AS3")
...
Here is the script labelx.jnl (Note that the line containing the repeat
command is long; it ends with $7). )
/can mode verify
! labelx.jnl  Put a label at a point, if the value
! of a variable is in a given range.  Loops over
! a range of X at a single value of Y.

! Arguments
!  1     variable to test and label if it is in given range
!  2, 3  lower bound, upper bound in x over which to test values of var
!  4      value of Y at which to test var
!  5, 6  if variable GE $5 and variable LT $6 then label the location
!  7     label to put at the location

repeat/x=$2:$3 (let/quiet sx = $1[y=$4,x=`x`]; if `sx ge $5 and sx lt $6` then label `x`,$4,0,0,.1,$7)
set mode/last verify


Ed Harrison wrote:

Years ago (back we had to make pseudo-contour plots on line printers)
many of us wrote codes that used 'palettes' componsed of numbers if nine
'contours' were enough or of contrasting line printer characters ("/",
"\", "*", etc.) if more contour range was needed.  Often =/- was
assigned by an overstruck "."

Such plots can be very effective.  Would they be tough to implement as
an external function?

Ed

Ansley Manke wrote:

>Hi All,
>Last month, Al Hermann wrote asking about color palettes which might
>copy or print in black and white nicely.  I don't know of any; greyscale
>palettes which show as much detail as a color palette will be hard to
>come by.  I want to mention that the use of pattern palettes is a good way
>to get more detail into a b/w plot, and the differences among patterns will
>still be present no matter what the copier does to the level of contrast
>on the page.
>
>Ansley Manke
>
>
>
>Al Hermann wrote:
>Speaking of palettes; does anyone have a nice *color* palette which turns into a
>
>reasonable *greyscale* when xeroxed/printed on b/w paper? Most color plots in
>journal articles do not xerox well, and it is usually impossible to tell high
>from low
>values. A single palette, which does double duty this way, would seem to be the
>ideal. Color palettes typically reveal details more clearly, but the xeroxed
>(hence
>greyscale) copy should at least communicate the general pattern in a monotonic
>way. I realize the answer is somewhat hardware dependent.
>
>-Al-Al
>
>
>


[Thread Prev][Thread Next][Index]

Dept of Commerce / NOAA / OAR / PMEL / TMAP

Contact Us | Privacy Policy | Disclaimer | Accessibility Statement