[gradsusr] Avoiding boundary markings from plots
Morwakoma Matabane
Morwakoma.Matabane at weathersa.co.za
Tue Jul 5 07:46:47 EDT 2011
I have tried to avoid the page (X,Y) boundary markings by using the attached script but the marks always appears. The IF STATEMENT does not appear to do the trick; how do I make sure that the marks at the boundaries do not appear but the interior marks appear?
For instance,
1) if('bcx'!='xx1'| 'bcx'!='xx2' | 'bcy'!='yy1' | 'bcy'!='yy2')
'draw mark 4 'bcx' 'bcy' .1'
else
'draw mark 0 'bcx' 'bcy' .1'
Endif
RESULT IN MARKINGS ANYWAY,
2)if('bcx'='xx1'| 'bcx'='xx2' | 'bcy'='yy1' | 'bcy'='yy2')
'draw mark 0 'bcx' 'bcy' .1'
else
'draw mark 4 'bcx' 'bcy' .1'
Endif
STILL RESULT IN THE MARKINGS, AND
3) if('bcx'>'xx1'| 'bcx'<'xx2' | 'bcy'>'yy1' | 'bcy'<'yy2')
'draw mark 4 'bcx' 'bcy' .1'
Endif
MARKINGS STILL AT THE BOUNDARIES.
NOTE: For testing choose BCX=XX1,BCY=YY1 or BCX=XX1,BCY=YY2 or BCX=XX2, BCY=YY1, or BCX=XX2, BCY=YY2.
***************************************************************************************************************
*Marking.gs
******************************************************************************************************************
'reinit'
'open e.t00z.ctl'
lat1=-60 ; lat2=0
lon1=-30 ; lon2=60
'set lat 'lat1' 'lat2
'set lon 'lon1' 'lon2
'set t 2'
'set gxout shaded'
'd apcp'
'cbarn'
*********************************************************
* Page boundaries
********************************************************
'q gxinfo'
rec1=sublin(result,3)
xx1=subwrd(rec1,4)
say 'xx1 is 'xx1
xx2=subwrd(rec1,6)
say 'xx2 is 'xx2
rec2=sublin(result,4)
yy1=subwrd(rec2,4)
say 'yy1 is 'yy1
yy2=subwrd(rec2,6)
say 'yy2 is 'yy2
*************************************************************
prompt "Enter bcx: "
pull bcx
say 'bcx is 'bcx
prompt "Enter bcy: "
pull bcy
say 'bcy is 'bcy
if('bcx'!='xx1'| 'bcx'!='xx2' | 'bcy'!='yy1' | 'bcy'!='yy2')
'draw mark 4 'bcx' 'bcy' .1'
else
'draw mark 0 'bcx' 'bcy' .1'
endif
'set lat 'lat1' 'lat2
'set lon 'lon1' 'lon2
'printim xx.gif gif -x1400 -y1200 white'
'quit'
Regards
Morwakoma M Matabane
Scientist ( South African Weather Service)
This e-mail is subject to the South African Weather Service e-mail legal notice, to view please visit:
http://www.weathersa.co.za/legal/email.asp
-
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://gradsusr.org/pipermail/gradsusr/attachments/20110705/8e5d3d3a/attachment-0003.html
More information about the gradsusr
mailing list