[gradsusr] color levels
Nibin Gopi
nibingopi10 at gmail.com
Wed Jan 4 05:24:29 EST 2017
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
'reinit'
'open cnt_2014-09-25_d03.ctl'
'set t 1'
'define var = t2'
i=1
while(i<=324)
j=1
while(j<=324)
'q defval var 'i' 'j
val = subwrd(result,3)
if (val>= 295.0 & val <= 298 )
'set defval var 'i' 'j' '1
endif
if (val > 298.0 )
'set defval var 'i' 'j' '0
endif
j=j+1
endwhile
i=i+1
endwhile
'set gxout grfill'
'set clevs 0 1 '
'set ccols 2 3 '
*'d var'
*'run cbarn'
*'printim 1.png white'
***********************************************************
'define var1=rh2'
'set t 1'
i=1
while(i<=324)
j=1
while(j<=324)
'q defval var1 'i' 'j
val1=subwrd(result,3)if (val1 >= 50.0 & val1 <= 60.0 )
'set defval var1 'i' 'j' '1
endif
if (val1 > 60 )
'set defval var1 'i' 'j' '0
endif
j=j+1
endwhile
i=i+1
endwhile
'set gxout grfill'
'set clevs 0 1'
'set ccols 2 3'
'd var1'
'run cbarn.gs'
'printim 2.png white'
*********************************************************888
'define var2=rainc+rainnc'
'set t 1'
'define var2=rainc+rainnc'
i=1
while(i<=324)
j=1
while(j<=324)
'q defval var2 'i' 'j
val2=subwrd(result,3)
if (val2 >= 75.0 & val2 <= 175.0 )
'set defval var2 'i' 'j' '1
endif
if (val2 > 175.0 )
'set defval var2 'i' 'j' '0
endif
j=j+1
endwhile
i=i+1
endwhile
'set gxout grfill'
'set clevs 0 1'
'set ccols 2 3'
*'d var2'
'run cbarn.gs'
'printim 3.png white'
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://gradsusr.org/pipermail/gradsusr/attachments/20170104/6185154c/attachment.html
More information about the gradsusr
mailing list