Re: How to fix plot size and shape independent of paper size

From: Douglas Lowe <Douglas.Lowe_at_nyahnyahspammersnyahnyah>
Date: Tue May 07 2013 - 07:30:45 MDT

Hi Mary,

Thanks for your suggestion to set gsnMaximize to False. I had not explicitly set this flag in my script, but having tried setting it to False I've now worked out that the default value for this option that is used by the wrf_map_overlays script must be True, which is what was causing my problems.

Thanks!
Doug

________________________________________
From: Mary Haley [haley@ucar.edu]
Sent: 03 May 2013 15:31
To: Douglas Lowe
Cc: ncl-talk@ucar.edu
Subject: Re: How to fix plot size and shape independent of paper size

Hi Doug,

When you say "plot size", do you mean the box that contains the plot, and not all the tickmarks and labels around it?

If so, *and* the axes limits are the same for every plot, then the solution may be simply to *not* set res@gsnMaximize to True, because when gsnMaximize = False (the default), the plot should be drawn with the same size and in the same space every time.

I've attached a simple contour plot script that illustrates this. You will see if gsnMaximize is not set to True, then the plot is drawn to the same area every time, even with the extra long title in there. Try setting res@gsnMaximize = True to see what happens to the two plots when drawn on top of each other.

Another way you can force the plots to be the same size is by querying the size and location of the first plot (using a "getvalues" block to retrieve the vpXXXX resource values), and making sure that all other plots have the same vpXXX values.

For this one, you can set res@gsnMaximize=True for the first plot, but don't set it for subequent plots, because then the vpXXX resources will recalculated by gsn_csm_contour.

I've attached a second script (based on the first one) that illustrates this.

--Mary
_______________________________________________
ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Tue May 7 07:31:01 2013

This archive was generated by hypermail 2.1.8 : Wed May 15 2013 - 10:19:28 MDT