retrieving vpage info
Muthuvel Chelliah
Muthuvel.Chelliah at NOAA.GOV
Wed Dec 2 12:06:16 EST 2009
Charles,
Since I posted, without getting into details, let me say,
I am able to do what I wanted to do.
Thanks much for your attention. Good day.
Muthu
---------------------------------------------------------------------
Muthuvel Chelliah eMail: Muthuvel.Chelliah at noaa.gov
Rm.605A, Climate Prediction Center Ph: (301) 763-8000 X 7546
NCEP/NWS/NOAA/U.S.Dept. of Commerce FAX: (301) 763-8395
5200 Auth Road, NOAA Science Center
Camp Springs, MD 20746-4304
---------------------------------------------------------------------
Charles Seman wrote:
> Muthuvel,
>
> I'm not sure what you might be doing, but here's some code based on a
> technique to shade missing (undef) values a specific color
> from a post to the GrADS Listserv by Arindam Chakraborty on Thu, 23
> Jan 2003: Arindam Chakraborty <arch at CAOS.IISC.ERNET.IN>
> ---
> var_clevs= ' -32 -16 -8 -4 -2 -1 1 2 4 8 16 32'
> var_ccols = '9 14 4 11 5 13 0 10 7 12 8 2 6' ;*
> note "0" for var_clevs between -1 to 1; see
> http://grads.iges.org/grads/gadoc/colorcontrol.html
> ...
> 'set vpage 0.0 8.5 0.0 3.5'
> 'set parea 1.0 7.0 0.4 3.0'
> display_var('var',var_clevs,var_ccols)
> ...
> function display_var(var,var_clevs,var_ccols)
> *
> * technique to shade missing (undef) values a specific color
> * from a post to the GrADS Listserv by Arindam Chakraborty on
> * Thu, 23 Jan 2003: Arindam Chakraborty <arch at CAOS.IISC.ERNET.IN>
> *
> 'set grads off'
> 'set gxout shaded'
> 'd 'var
> 'q gxinfo'
> xlin = sublin(result,3)
> ylin = sublin(result,4)
> xl = subwrd(xlin,4)
> xh = subwrd(xlin,6)
> yl = subwrd(ylin,4)
> yh = subwrd(ylin,6)
> 'set rgb 16 220 220 220'
> 'set line 16'
> 'draw recf 'xl' 'yl' 'xh' 'yh
> 'set clevs 'var_clevs
> 'set ccols 'var_ccols
> 'd 'var
> 'cbar 0.7'
>
> return
> ---
>
> Hope this helps,
> Chuck
>
> Muthuvel Chelliah wrote:
>> The "q gxinfo" tells if it is a landscape or portrait by giving the
>> "page
>> size" as 11 by 8.5 OR 8.5 by 11. But If I subdivide the total page
>> plot area
>> into multiple regions (say for example to display multiple x-y plots
>> in a
>> page) is there any command to give me back the "vpage" dimensions (I
>> mean:
>> xmin xmax ymin ymax) that are being used. In other words, once a 'set
>> vpage
>> is declared (computed from within another script and set there - this
>> script
>> is called from the main script) how do I get that vpage info in the main
>> script. I hope this is not confusing. Thanks much for your time.
>> Muthu
>>
>
More information about the gradsusr
mailing list