Re: panel plot papersize

From: Mary Haley <haley_at_nyahnyahspammersnyahnyah>
Date: Thu Sep 01 2011 - 14:28:10 MDT

Xin,

You need to be more clear about what you mean by "it didn't work".

The one problem I see with your script is that "text" is getting overwritten each time through the loop. This is going to cause only the last text string to show up. Is this the problem you're talking about?

If so, then just like you did for "plts", you need to create an array to hold your text strings:

text = new(10,graphic)

Then, inside your do loop:

>
> do i=0,9
> plts(i) = gsn_csm_contour_map(wks,data(i,:,:), res)
> text(i) =gsn_add_text (wks,plts(i),years(i),41,58,rtxt)
> end do

If this still doesn't work, then please include a sample graphic.

Thanks,

--Mary

On Sep 1, 2011, at 11:37 AM, Xin Xi wrote:

> Here is the part of script relevant to my problem:
>
> type = "pdf"
> type@wkPaperWidthF = 20 ; in inches
> type@wkPaperHeightF = 8 ; in inches
>
> wks = gsn_open_wks (type, "ndvi.gimms")
> res@...=...
> ....
>
> plts = new (10 , graphic)
>
> rtxt = True
> rtxt@txJust = "CenterLeft"
> rtxt@txFontHeightF = 0.04
> rtxt@PerimOn=True
> rtxt@txBackgroundFillColor="White"
>
> do i=0,9
> plts(i) = gsn_csm_contour_map(wks,data(i,:,:), res)
> text=gsn_add_text (wks,plts(i),years(i),41,58,rtxt)
> end do
>
> resP = True
> resP@gsnMaximize = True
> resP@...=...
> ...
>
> gsn_panel(wks,plts,(/2,5/),resP)
>
> END
>
>
>
>
> On Thu, Sep 1, 2011 at 1:32 PM, Dennis Shea <shea@ucar.edu> wrote:
> This is offline.
>
> PLEASE post to ncl-talk a *clean* version of your script.
> Also, since NCL is case sensitive, you must use small and
> capital correctly.
>
>
>
> On 09/01/2011 11:30 AM, Xin Xi wrote:
> Hi all,
>
> I have a panel plot with 2x5 size; on each individual plot, there is a
> text string (gsn_add_text). I tried to set res@gsnMaximize=true, and
> res_panel@gsnMaximize=true; Neither worked.
>
> I did some searches. it seems the text string may knock the gsnMaximize
> off. If so, any solutions?
>
> Also, to define paper size, do I need to set wkorientation=landscape, or
> just set paperwidthF and paperheightF to a scale of 2x5?
> Thanks.
>
> Xin
>
>
>
>
> _______________________________________________
> ncl-talk mailing list
> List instructions, subscriber options, unsubscribe:
> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
>
>
> --
> ======================================================
> Dennis J. Shea tel: 303-497-1361 |
> P.O. Box 3000 fax: 303-497-1333 |
> Climate Analysis Section |
> Climate & Global Dynamics Div. |
> National Center for Atmospheric Research |
> Boulder, CO 80307 |
> USA email: shea 'at' ucar.edu |
> ======================================================
>
>
>
> --
> Xin Xi
> School of Earth and Atmospheric Sciences
> Georgia Institute of Technology
> 311 Ferst Drive, Atlanta, GA 30332-0340
>
> _______________________________________________
> 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 Thu Sep 1 14:28:17 2011

This archive was generated by hypermail 2.1.8 : Wed Sep 07 2011 - 10:58:58 MDT