[ncl-talk] Why I can not get the right position for the 2 Figure in a wks? (Question on the vp resource?)

林祥 xianglin72 at icloud.com
Tue Oct 31 16:46:04 MDT 2017


Thank you for the reply! I’ve just tried these 3 line scripts just before sending the mail.

And here below is what  I got.



So you can see the problem was not resolved.  

I write my scripts in referring to the example 20 in the page of “Panel plot” (http://www.ncl.ucar.edu/Applications/panel.shtml <http://www.ncl.ucar.edu/Applications/panel.shtml>)

The related lines in the panel_20.ncl were as below:

 xy0 = gsn_csm_xy (wks,u&lat,u(0,:,{82}),xyres) ; create plot
 xy1 = gsn_csm_xy (wks,u&lat,u(1,:,{82}),xyres) ; create plot
 cn0 = gsn_csm_contour_map(wks,u(0,:,:),cnres)
 cn1 = gsn_csm_contour_map(wks,u(1,:,:),cnres)
 psres = True                                                               
 maximize_output(wks,sprees)

So i don’t understand why they can work in the example but not in my sctpts?  In fact, I was often puzzled by the vp resource or resizing problem as you mentioned,
could you give me some more introduction or advice?   


Thanks!


Lin




> 在 2017年11月1日,00:22,Mary Haley <haley at ucar.edu> 写道:
> 
> I think it's your maximize_output call that is the problem.  This function will maximize the size of all plots on that particular frame so they are as large as possible. You don't want to call this, because you went through the trouble of resizing the plots yourself.
> 
> I suggest not calling maximize_output and instead calling draw and frame:
> 
> draw(hov1)
> draw(cn1)
> frame(wks)
> 
> --Mary
> 
> 
> 
> On Tue, Oct 31, 2017 at 8:11 AM, 林祥 <xianglin72 at icloud.com <mailto:xianglin72 at icloud.com>> wrote:
> Hi , all
> 
>   I want to plot 2 figure and place them like this below
> 
> 
> 
> 
> 
> And I use the following related scripts:
> 
> “ ….
>    res at vpXF                 = 0.08
>    res at vpYF                 = 0.9
>    res at vpWidthF             = 0.6
>    res at vpHeightF            = 0.3
> 
>   hov1  = gsn_csm_hov( wks, yc1, res )
> 
>   res3 at vpXF     = 0.08
>   res3 at vpYF     = 0.5
>   ;res3 at vpKeepAspect  = True
>   res3 at mpShapeMode          ="FreeAspect"
>   res3 at vpWidthF             = 0.6
>   res3 at vpHeightF            = 0.2
> 
>    cn1  = gsn_csm_contour_map_ce(wks, zc1, res3)
> 
>   maximize_output(wks, True)
> 
> … "
> 
> However, I got this as below, I try many time to modify the values of vpXF, vpYF, vpWidthF, vpHeightF,
> 
> but still can not get the proper result. Anyone can give me some advise?
> 
> btw, I also attach my script file .
> 
> 
> 
> Thanks!
> 
> 
> 
> 
> 
> 
> 
> _______________________________________________
> ncl-talk mailing list
> ncl-talk at ucar.edu <mailto:ncl-talk at ucar.edu>
> List instructions, subscriber options, unsubscribe:
> http://mailman.ucar.edu/mailman/listinfo/ncl-talk <http://mailman.ucar.edu/mailman/listinfo/ncl-talk>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20171101/86916a59/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: page1image256.png
Type: image/png
Size: 143118 bytes
Desc: not available
URL: <http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20171101/86916a59/attachment-0001.png>


More information about the ncl-talk mailing list