line plot; how to color shade above/below say, 1sd level

Mary Jo Nath Mary-Jo.Nath at NOAA.GOV
Thu Aug 17 12:30:52 EDT 2006


Muthu,

Someone else might know a more elegant way of doing this, but here's
what I'd do, if I'm understanding you correctly:

If "SOI" = 1-D time series of SOI  and  sd = The standard deviation (a
constant) :

* sd needs to be converted into a variable with the same dimensions as SOI
define sd = SOI*0 + sd

set gxout linefill
* color fill when SOI > 1sd red, and color area below black (assuming
graphics window background is black).
set lfcols 2 0
d SOI ; sd
* color fill  when SOI < -1sd green, masking out when SOI > 0 otherwise
the red shading will be overwritten with black
set lfcols 0 3
d maskout(SOI,-SOI) ; -sd

* then draw the curve for SOI
set gxout line
set ccolor 1
d SOI

Mary Jo

Muthuvel Chelliah wrote:
> Hello,
>
> In a line plot (of say SOI), can someone please tell me how to
> shade/color_fill in diff. colors values above/below certain levels.
> I hope I am making myself clear.
>
> thanks a lot
> Muthu
>



More information about the gradsusr mailing list