Re: maximize the plot

From: Adam Phillips <asphilli_at_nyahnyahspammersnyahnyah>
Date: Thu Nov 15 2012 - 09:58:51 MST

Hi Ousmane,
For XY plots, you can adjust the shape of them using the following
resources: vpXF, vpYF, vpWidthF, and vpHeightF. When paneling the former
two are not needed. By default, vpWidthF and vpHeightF = 0.6, which
results in a square plot shape. If you want to panel 4 XY plots, and put
them all in one column, I would suggest trying to set vpWidthF = 0.8,
and vpHeightF = 0.3 as a first guess.

Take a look at example #24 here:
http://www.ncl.ucar.edu/Applications/panel.shtml#ex24
and example #5 here:
http://www.ncl.ucar.edu/Applications/xy.shtml#ex5

to see examples of vpWidthF and vpHeightF being used.. Note that the
units of these resources are in NDC units, which run from 0->1 along
both the X and Y planes of your workstation. Also note that when
paneling the ratio of vpWidthF and vpHeightF will be maintained, but the
sizes of each that are set may not be..

If that advice doesn't help, please respond to ncl-talk..
Adam

On 11/15/2012 08:15 AM, ousmane ndiaye wrote:
> Hi,
> I want to make each panel span the width of the paper but it doesn't
> here is part of my coding :
> ==
>
> plot = new (4, graphic)
> wks = gsn_open_wks("pdf","skill")
> res = True ; plot mods desired
> res@gsnDraw = False
> res@gsnFrame = False
> res@trXMinF = 1
> res@trXMaxF = 21
> res@tiXAxisString = "Stations "
> res@tiYAxisString = "Correlation "
> res@xyLineThicknesses = (/2.0,1.0,1.0,1.0,1.0,2.0/) ; make 2nd
> lines thicker
> res@xyLineColors = ccols(:) ; change line color
> res@xyMonoDashPattern = False ;True ; all solid
>
> res@pmLegendDisplayMode = "Always" ; turn on legend
> res@pmLegendSide = "Bottom" ; Change location of
> res@pmLegendParallelPosF = .25 ; move units right
> res@pmLegendOrthogonalPosF = -0.8 ; move units down
> res@pmLegendWidthF = 0.125 ; Change width and
> res@pmLegendHeightF = 0.15 ; height of legend.
> res@lgLabelFontHeightF = .015 ; label font height
> res@xyExplicitLegendLabels = clegend(:)
>
> ; set the X axis
> res@tmXBMode = "Explicit"
> res@tmXBValues =x
> res@tmXBLabelAngleF =-90 ; making label tilted
> res@tmXBLabels = nom
>
> res@trYMinF = 0
> res@trYMaxF = 1
> res@tiMainString = "Intra-seasonal raw "
> plot(0) = gsn_csm_xy (wks, x, rraw(:,:), res)
> res@tiMainString = "Intra-seasonal Anomaly "
> plot(1) = gsn_csm_xy (wks, x, rano(:,:), res)
> res@tiMainString = "Annual cycle spearman"
> plot(2) = gsn_csm_xy (wks, x, rspr(:,:), res)
>
> res@trYMinF = 2
> res@trYMaxF = 12
> res@pmLegendOrthogonalPosF = -1.4 ; move units down
> res@pmLegendParallelPosF = .15 ; move units right
> res@tiMainString = "RMSE on the Ann cycle"
> plot(3) = gsn_csm_xy (wks, x, rmse(:,:), res)
>
> resP = True ; modify the panel plot
> resP@gsnMaximize = True ; Maximize plot in frame.
> gsn_panel(wks,plot,(/4,1/),resP) ; now draw as one plot
>
> delete([/wks,plot,res,resP/])
>
> ==
>
>
>
> _______________________________________________
> ncl-talk mailing list
> List instructions, subscriber options, unsubscribe:
> http://mailman.ucar.edu/mailman/listinfo/ncl-talk

-- 
______________________________________________________________
Adam Phillips                                asphilli@ucar.edu
NCAR/Climate and Global Dynamics Division       (303) 497-1726
P.O. Box 3000				
Boulder, CO 80307-3000    http://www.cgd.ucar.edu/cas/asphilli

_______________________________________________
ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Thu Nov 15 09:59:07 2012

This archive was generated by hypermail 2.1.8 : Wed Nov 21 2012 - 11:16:05 MST