vpage and cutting of cbarn
Dave Allured
dave.allured at NOAA.GOV
Mon Jan 17 16:49:38 EST 2005
G. Nina,
1. Use cbarn instead of cbar as shown in your sample code below.
2. cbarn takes several optional arguments to control size, orientation,
and positioning of the color bar. Use the X and Y arguments to
microposition the color bar exactly as needed to prevent cropping. HTH.
--Dave A.
CDC/NOAA/CIRES
Gudrun Nina Petersen wrote:
> Hi!
>
> I am using vpage to plot 2 figures together.
> It appears that only a part of my color bar is on the page.
> I have tried to change the vpage parameters but can't see that it makes a
> difference.
> The script is below and I've attached a figure.
> I'm sure there is a simple solution, can anyone help me?
>
> Cheers,
>
> G. Nina Petersen
>
> ---
>
> 'open mslp_flex.ctl'
> 'open z500_flex.ctl'
> 'open targ_flex.ctl'
> 'open ener_flex.ctl'
>
> 'set vpage 0 8.5 5.5 11'
>
> 'set gxout shaded'
> 'd pdat.3'
> 'run cbar'
>
> 'set gxout contour'
> 'd pdat.2'
>
> xstart = 4.15
> ystart = 5.3
> hsiz=0.09
> vsiz=0.12
>
> 'set line 1 1 6'
>
> title='title1'
> 'set string 1 bc 4'
> 'set strsiz 'hsiz' 'vsiz
> 'draw string 'xstart' 'ystart' '%title
>
> ystart = ystart - 0.20
> title2='title2'
> 'set string 1 bc 4'
> 'set strsiz 'hsiz' 'vsiz
> 'draw string 'xstart' 'ystart' '%title2
>
> ystart = ystart - 0.20
> title3='title3'
> 'set string 1 bc 4'
> 'set strsiz 'hsiz' 'vsiz
> 'draw string 'xstart' 'ystart' '%title3
>
> 'set vpage 0 8.5 0 5.5'
>
> 'set gxout shaded'
> 'd pdat.4'
> 'run cbar'
>
> 'set gxout contour'
> 'd pdat.1'
>
> ystart = 5.3
>
> title4='title4'
> 'set string 1 bc 4'
> 'set strsiz 'hsiz' 'vsiz
> 'draw string 'xstart' 'ystart' '%title4
>
> title5='title5'
> ystart = ystart - 0.20
> 'set string 1 bc 4'
> 'set strsiz 'hsiz' 'vsiz
> 'draw string 'xstart' 'ystart' '%title5
>
> *Writing directly to a gif file
> 'printim ec.gif gif x850 y1100 white'
>
> 'quit'
>
> -----
> ---------------------------
> Gudrun Nina Petersen
> Department of Meteorology
> University of Reading
> PO Box 243
> Earley Gate
> Reading, RG6 6BB
>
> Tel: +44 (0)118 378 5568
More information about the gradsusr
mailing list