<div dir="ltr"><div>Use gxout fgrid to plot a discrete field and set fgvals to set the values and colors for each discrete value.<br><br></div>Jeff Duda<br></div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Jan 4, 2017 at 4:24 AM, Nibin Gopi <span dir="ltr"><<a href="mailto:nibingopi10@gmail.com" target="_blank">nibingopi10@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">i want to plot only 0 and 1 in my color bar bur a range is coming between 0 and 1. what i will do for that . here the programme<br><br>'reinit'<br>'open cnt_2014-09-25_d03.ctl'<br>'set t 1'<br>'define var = t2'<br>i=1<br>while(i<=324)<br>j=1<br>while(j<=324)<br>'q defval var 'i' 'j<br>val = subwrd(result,3)<br>if (val>= 295.0 & val <= 298 )<br> 'set defval var 'i' 'j' '1<br>endif<br>if (val > 298.0 )<br> 'set defval var 'i' 'j' '0<br>endif<br>j=j+1<br>endwhile<br>i=i+1<br>endwhile<br>'set gxout grfill'<br>'set clevs 0 1 '<br>'set ccols 2 3 '<br>*'d var'<br>*'run cbarn'<br>*'printim 1.png white'<br><br>******************************<wbr>*****************************<br>'define var1=rh2'<br>'set t 1'<br>i=1<br>while(i<=324)<br>j=1<br>while(j<=324)<br>'q defval var1 'i' 'j<br>val1=subwrd(result,3)if (val1 >= 50.0 & val1 <= 60.0 )<br> 'set defval var1 'i' 'j' '1<br>endif<br>if (val1 > 60 )<br> 'set defval var1 'i' 'j' '0<br>endif<br>j=j+1<br>endwhile<br>i=i+1<br>endwhile<br>'set gxout grfill'<br>'set clevs 0 1'<br>'set ccols 2 3'<br>'d var1'<br>'run <a href="http://cbarn.gs" target="_blank">cbarn.gs</a>'<br>'printim 2.png white'<br>******************************<wbr>***************************888<br>'define var2=rainc+rainnc'<br>'set t 1'<br>'define var2=rainc+rainnc'<br>i=1<br>while(i<=324)<br>j=1<br>while(j<=324)<br>'q defval var2 'i' 'j<br>val2=subwrd(result,3)<br>if (val2 >= 75.0 & val2 <= 175.0 )<br> 'set defval var2 'i' 'j' '1<br>endif<br>if (val2 > 175.0 )<br> 'set defval var2 'i' 'j' '0<br>endif<br>j=j+1<br>endwhile<br>i=i+1<br>endwhile<br>'set gxout grfill'<br>'set clevs 0 1'<br>'set ccols 2 3'<br>*'d var2'<br>'run <a href="http://cbarn.gs" target="_blank">cbarn.gs</a>'<br>'printim 3.png white'<br><br> <br><br><br></div>
<br>______________________________<wbr>_________________<br>
gradsusr mailing list<br>
<a href="mailto:gradsusr@gradsusr.org">gradsusr@gradsusr.org</a><br>
<a href="http://gradsusr.org/mailman/listinfo/gradsusr" rel="noreferrer" target="_blank">http://gradsusr.org/mailman/<wbr>listinfo/gradsusr</a><br>
<br></blockquote></div><br><br clear="all"><br>-- <br><div class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div>Jeff Duda<br>Post-doctoral research fellow<br>University of Oklahoma School of Meteorology<br></div></div></div></div></div>
</div>