Re: Ununiform size of paneled plots with function "gsn_attach_plots"

From: Mary Haley <haley_at_nyahnyahspammersnyahnyah>
Date: Mon Apr 26 2010 - 09:14:57 MDT

Hi Jun,

Without seeing your full script, I can only guess at the problem.

This might happen if the X range for that last plot is not identical to the X range for the rest of your plots. In fact, all of your plots should have the same X range when using the attach plots code.

There may be something else going on, like perhaps your plots are slightly different sizes because of the types of labels you have on the Y axes.

You could try "fixing" the size of the plots by setting vpWidthF and vpHeightF to the same value for each plot, and making sure you *don't* have gsnMaximize set to True.
You should still set attachres1@gsnMaximize = True so that the final result is maximized in the frame.

Another thing you can try, since you probably need to do this anyway, is to clean up the labels on the Y axis so they don't run into each other. You can do this by making the labels smaller with tmYLLabelFontHeightF (try a small value like 0.01 and change if needed). Or, you can set these three resources:

  res@tmYLMode = "Explicit" ; explicitly set the Y-axis labels
  res@tmYLValues = (/17,19,21,23/) ; Values where tickmarks are desired
  res@tmYLLabels = "" + res@tmYLValues ; Labels to use at those values.
You will probably need to set these differently for each individual plot, since they seem to have different ranges.

--Mary

On Apr 26, 2010, at 12:45 AM, Jun Cheng wrote:

> Dear Sir/Madam,
>
> When using function "gsn_attach_plots" to panel plot more than 4, the lowest one in the paneled plot has ununiform size with others, as shown in attachment, anybody know how to resolve this problem?
>
> Thanks,
>
> Jun
>
>
> ;;;;;; Attach plots along the X axes
> attachres1 = True
> attachres1@gsnAttachPlotsXAxis = True ;; attaches along x-axis
> attachres1@gsnAttachBorderOn = False ;; No border please
> attachres2 = True
> attachres2@gsnAttachPlotsXAxis = True ;; attaches along x-axis
> attachres2@gsnAttachBorderOn = False ;; No border please
>
> attachid1 = gsn_attach_plots(plot(0),plot(1:5),attachres1,attachres2)
>
> ;;;;;; Maximize output on the page and draw everything
> pres = False ; No resources needed
> maximize_output(wks,pres) ; Maximize plot on page
>
>
> <SST_TraCE_Proxy.pdf>
>
>
>
>
>
>
>
> _______________________________________________
> 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 Mon Apr 26 09:15:03 2010

This archive was generated by hypermail 2.1.8 : Thu Apr 29 2010 - 08:05:27 MDT