[gradsusr] Setting color bar for animation

Clay Blankenship clay.b.blankenship at nasa.gov
Wed Mar 23 18:11:11 EDT 2011


OK, I think I am starting to understand, but it's odd that you can do
set ccols
d var
cbar      (resetting clevs/ccols?)
d var
cbar

and after the first 'd var' cbar has the original shading info but not  
the second time.  The ccols/clevs must not be the thing that  
determines the color bar scale, which is what is throwing me off.

Anyway, why does the following not work?

If I hard-code dd.gs to 'make_clevs 0 2 .2' I get the color bar from 0  
to 2 like I want.  If I pass the parameters and do 'dd soilwat5 -cmin  
0 -cmax 2 -cint .2', it gets the values (the "say" command prints the  
expected numbers) but the color bar only goes to 1 (the max data  
value).  Am I putting quotation marks in the right place.  I am not  
sure make_clevs is getting the three values.

Clay




function dd (args)
*Plot a variable and its color scale.
* dd variable [ -cmin minimum value ]
*             [ -cmax maximum value ]
*             [ -cint color scale ]

variable=subwrd(args,1)

cint=''
cmin=''
cmax=''
n=2

while(n<7)
idx=subwrd(args,n)
opt=subwrd(args,n+1)
if(idx='');break;endif
if(idx='-cint');cint=opt;endif
if(idx='-cmin');cmin=opt;endif
if(idx='-cmax');cmax=opt;endif
n=n+2
endwhile

'c'
'set gxout shaded'
say cint
say cmin
say cmax

'make_clevs ' cmin cmax cint

'd 'variable


'cbar2'




-- 
Clay Blankenship                 * USRA Research Scientist
clay.b.blankenship at nasa.gov      * 256-961-7638
320 Sparkman Drive               * Huntsville, AL 35805 USA
National Space Science and Technology Center at NASA-MSFC/UAH






-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://gradsusr.org/pipermail/gradsusr/attachments/20110323/8a527e96/attachment-0003.html 


More information about the gradsusr mailing list