<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=us-ascii">
<META content="MSHTML 6.00.6000.17095" name=GENERATOR></HEAD>
<BODY 
style="WORD-WRAP: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space">
<DIV dir=ltr align=left><SPAN class=567541622-23032011><FONT face=Arial 
color=#0000ff size=2>I looked in one of my scripts where I calculate the min, 
max.</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=567541622-23032011><FONT face=Arial 
color=#0000ff size=2></FONT></SPAN>&nbsp;</DIV>
<DIV dir=ltr align=left><SPAN class=567541622-23032011><FONT face=Arial 
color=#0000ff size=2>You are correct .. it is only seeing the first 
value.</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=567541622-23032011><FONT face=Arial 
color=#0000ff size=2></FONT></SPAN>&nbsp;</DIV>
<DIV dir=ltr align=left><SPAN class=567541622-23032011><FONT face=Arial 
color=#0000ff size=2>You need</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=567541622-23032011><FONT face=Arial 
color=#0000ff size=2></FONT></SPAN>&nbsp;</DIV>
<DIV dir=ltr align=left><SPAN class=567541622-23032011><FONT face=Arial 
color=#0000ff size=2>'make_clevs 'vaule_1' 'value_2' 
'value_3</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=567541622-23032011><FONT face=Arial 
color=#0000ff size=2></FONT></SPAN>&nbsp;</DIV>
<DIV dir=ltr align=left><SPAN class=567541622-23032011><FONT face=Arial 
color=#0000ff size=2>.. you need the spaces between the 
values...</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=567541622-23032011><FONT face=Arial 
color=#0000ff size=2></FONT></SPAN>&nbsp;</DIV>
<DIV dir=ltr align=left><SPAN class=567541622-23032011><FONT face=Arial 
color=#0000ff size=2>ron</FONT></SPAN></DIV>
<DIV>&nbsp;</DIV><BR>
<DIV class=OutlookMessageHeader lang=en-us dir=ltr align=left>
<HR tabIndex=-1>
<FONT face=Tahoma size=2><B>From:</B> gradsusr-bounces@gradsusr.org 
[mailto:gradsusr-bounces@gradsusr.org] <B>On Behalf Of </B>Clay 
Blankenship<BR><B>Sent:</B> March 23, 2011 4:11 PM<BR><B>To:</B> GrADS Users 
Forum<BR><B>Subject:</B> Re: [gradsusr] Setting color bar for 
animation<BR></FONT><BR></DIV>
<DIV></DIV>OK, I think I am starting to understand, but it's odd that you can 
do&nbsp;
<DIV>set ccols</DIV>
<DIV>d var</DIV>
<DIV>cbar &nbsp; &nbsp; &nbsp;(resetting clevs/ccols?)</DIV>
<DIV>d var</DIV>
<DIV>cbar</DIV>
<DIV><BR></DIV>
<DIV>and after the first 'd var' cbar has the original shading info but not the 
second time. &nbsp;The ccols/clevs must not be the thing that determines the 
color bar scale, which is what is throwing me off.</DIV>
<DIV><BR></DIV>
<DIV>Anyway, why does the following not work?</DIV>
<DIV>
<DIV><BR></DIV>
<DIV>If I hard-code dd.gs to 'make_clevs 0 2 .2' I get the color bar from 0 to 2 
like I want. &nbsp;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). &nbsp;Am I putting 
quotation marks in the right place. &nbsp;I am not sure make_clevs is getting 
the three values.</DIV>
<DIV><BR></DIV>
<DIV>Clay</DIV>
<DIV><BR></DIV>
<DIV><BR></DIV>
<DIV><BR></DIV>
<DIV><BR></DIV>
<DIV>function dd (args)</DIV>
<DIV>*Plot a variable and its color scale.</DIV>
<DIV>* dd variable [ -cmin minimum value ]</DIV>
<DIV>* &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; [ -cmax maximum value ]</DIV>
<DIV>* &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; [ -cint color scale ]</DIV>
<DIV><BR></DIV>
<DIV>variable=subwrd(args,1)</DIV>
<DIV><BR></DIV>
<DIV>cint=''</DIV>
<DIV>cmin=''</DIV>
<DIV>cmax=''</DIV>
<DIV>n=2</DIV>
<DIV><BR></DIV>
<DIV>while(n&lt;7)</DIV>
<DIV>idx=subwrd(args,n)</DIV>
<DIV>opt=subwrd(args,n+1)</DIV>
<DIV>if(idx='');break;endif</DIV>
<DIV>if(idx='-cint');cint=opt;endif</DIV>
<DIV>if(idx='-cmin');cmin=opt;endif</DIV>
<DIV>if(idx='-cmax');cmax=opt;endif</DIV>
<DIV>n=n+2</DIV>
<DIV>endwhile</DIV>
<DIV><BR></DIV>
<DIV>'c'</DIV>
<DIV>'set gxout shaded'</DIV>
<DIV>say cint</DIV>
<DIV>say cmin</DIV>
<DIV>say cmax</DIV>
<DIV><BR></DIV>
<DIV>'make_clevs ' cmin cmax cint</DIV>
<DIV><BR></DIV>
<DIV>'d 'variable</DIV>
<DIV><BR></DIV>
<DIV><BR></DIV>
<DIV>'cbar2'</DIV></DIV>
<DIV><BR></DIV>
<DIV><BR></DIV>
<DIV><BR></DIV>
<DIV><BR>
<DIV apple-content-edited="true">
<DIV 
style="WORD-WRAP: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space"><SPAN 
class=Apple-style-span 
style="WORD-SPACING: 0px; FONT: medium Helvetica; TEXT-TRANSFORM: none; COLOR: rgb(0,0,0); TEXT-INDENT: 0px; WHITE-SPACE: normal; LETTER-SPACING: normal; BORDER-COLLAPSE: separate; orphans: 2; widows: 2; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px">
<DIV 
style="WORD-WRAP: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space"><SPAN 
class=Apple-style-span 
style="WORD-SPACING: 0px; FONT: 12px Monaco; TEXT-TRANSFORM: none; COLOR: rgb(0,0,0); TEXT-INDENT: 0px; WHITE-SPACE: normal; LETTER-SPACING: normal; BORDER-COLLAPSE: separate; orphans: 2; widows: 2; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px">
<DIV 
style="WORD-WRAP: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space"><SPAN 
class=Apple-style-span 
style="WORD-SPACING: 0px; FONT: 12px Monaco; TEXT-TRANSFORM: none; COLOR: rgb(0,0,0); TEXT-INDENT: 0px; WHITE-SPACE: normal; LETTER-SPACING: normal; BORDER-COLLAPSE: separate; orphans: 2; widows: 2; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px">
<DIV 
style="WORD-WRAP: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space">
<DIV>
<DIV>
<DIV>
<DIV>--&nbsp;</DIV>
<DIV>Clay Blankenship &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; * 
USRA Research Scientist</DIV></DIV>
<DIV>
<DIV>
<DIV>
<DIV><A 
href="mailto:clay.b.blankenship@nasa.gov">clay.b.blankenship@nasa.gov</A> &nbsp; 
&nbsp; &nbsp;* 256-961-7638</DIV></DIV></DIV></DIV>
<DIV>320 Sparkman Drive &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; * 
Huntsville, AL 35805 USA</DIV></DIV></DIV>
<DIV>National Space Science and Technology Center at 
NASA-MSFC/UAH</DIV><BR></DIV></SPAN><BR 
class=Apple-interchange-newline></DIV></SPAN><BR 
class=Apple-interchange-newline></DIV></SPAN><BR 
class=Apple-interchange-newline></DIV><BR 
class=Apple-interchange-newline></DIV><BR></DIV></BODY></HTML>