Re: spaces between panel plots

From: Mary Haley <haley_at_nyahnyahspammersnyahnyah>
Date: Wed Sep 26 2012 - 13:21:29 MDT

Dear Xin,

Part of the problem is that you are paneling plots that are different sizes. The top left plot is bigger than everybody else, because it has labels on the top and left of the plot.

I created an example that mimics what you're doing. The key is to set some gsnPanel resources to control which plot the scaling is based on, to add some margin to the left and right side of the plots, and to increase the spacing a little between the plots (because when you change which plot is used for the scaling, the plots are drawn much too close together).

See example panel_28.ncl at:

http://www.ncl.ucar.edu/Applications/panel.shtml#ex28

--Mary

On Sep 26, 2012, at 12:01 AM, Xin Xi wrote:

> Hi, there,
> The attached plot is generated with gsn_panel approach. How do I adjust (e.g remove) the spaces between the individual plots, so the plot area can be fully used? I found a ncl example (panel_23.ncl), but with view point method. I am wondering whether there is another way to do it in gsn_panel. Plus the YR labels are missing.
> Thanks!
> Xin
>
>
> Here is parts of script:
>
>
> do i=0,10*6-1
>
> res@tmXBLabelsOn = False ; no bottom labels
> res@tmXBOn = False ; no bottom tickmarks
> res@tmYRLabelsOn = False ; no right labels
> res@tmYROn = False ; no right tickmarks
> res@tmYLLabelsOn = False ; do not draw left labels
> res@tmYLOn = False ; no left tickmarks
> res@tmXTLabelsOn = False ; do not draw top labels
> res@tmXTOn = False ; no top tickmarks
>
> res@tmXBLabelFontHeightF = 0.035
> res@tmYLLabelFontHeightF = 0.035
>
> if (i .le. 5) then
> res@tmXTLabelsOn = True
> res@tmXTOn = True
>
> else
> res@tmXTLabelsOn = False
> res@tmXTOn = False
> end if
>
> if (i .ge. 54) then
> res@tmXBLabelsOn = True
> res@tmXBOn = True
> else
> res@tmXBLabelsOn = False
> res@tmXBOn = False
> end if
>
> if (i%6 .eq. 0) then
> res@tmYLLabelsOn = True
> res@tmYLOn = True
> else
> res@tmYLLabelsOn = False
> res@tmYLOn = False
> end if
>
> if (i%6 .eq. 5) then
> res@tmYRLabelsOn = True
> res@tmYROn = True
> else
> res@tmYRLabelsOn = False
> res@tmYROn = False
> end if
>
> plts(i) = gsn_csm_contour_map(wks,pdsi_ca(i,:,:), res)
> end do
>
> resP = True
> resP@gsnFrame = False
> resP@gsnMaximize = True
> resP@gsnPanelCenter = False
> resP@gsnPanelLabelBar = True
> ; resP@gsnPanelTop = 0.02
> resP@txFontHeightF = .20
>
> resP@lbLabelFontHeightF = 0.012
> resP@pmLabelBarWidthF = 0.40
> resP@pmLabelBarHeightF = 0.04
>
> gsn_panel(wks,plts,(/10,6/),resP)
> frame(wks)
>
>
> <pdsi_1950.png>_______________________________________________
> ncl-talk mailing list
> List instructions, subscriber options, unsubscribe:
> http://mailman.ucar.edu/mailman/listinfo/ncl-talk

_______________________________________________
ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Wed Sep 26 13:21:38 2012

This archive was generated by hypermail 2.1.8 : Wed Sep 26 2012 - 13:56:03 MDT