Re: position of the plot

From: Mary Haley <haley_at_nyahnyahspammersnyahnyah>
Date: Fri, 1 Sep 2006 09:39:24 -0600 (MDT)

On Thu, 31 Aug 2006 wrote:

> Hi ,
> I have problem to plot the figure at the middle of the page. Also the label
> bar overlaps on the tick marks. How can I avoid that.
> I have attached my ncl code along with this mail.
> Thanking you,
> Nilesh

Hi Nilesh,

Without seeing what your graphic looks like, I can only make an estimate
on how to fix your problem.

First, a comment:

You have the code:

    ccf = new((/7,7/),"float")
    do lt=0,6
           do ln=0,6
       end do
    end do

Do loops are not efficient in NCL, so we recommend that you stay away
from them if you can. The above code can be rewritten without a "do"

   ccf = onedtond(rnccf(:,0),(/7,7/))

Even better, if you don't need "rnccf", then you can read the
values straight into ccf:

   ccf = asciiread("ltrncc.dat",(/7,7/),"float")

As for positioning the plot, I'm not sure what you mean by "plot the
figure at the middle of the page". NCL should do this by default in
most cases.

You are setting vpWidthF and vpHeightF to 0.8 and 1.0. These are
pretty big values considering the total width and height of your
canvas is 1.0. The height of your plot is going to take up the whole
canvas, so things like tickmark labels and labelbars, if they are on
top or bottom of your plot, are going to run off the page.

You are setting pmTickMarkZone to 0.5, but this resource takes only
integer values, so a value of 0.5 doesn't make sense. You shouldn't
need to set this resource at all.

Please try commenting out the following code and see if this improves
your plot:

; res_at_vpWidthF = 0.8
; res_at_vpHeightF = 1.0

; res_at_pmTickMarkZone = 0.5

ncl-talk mailing list
Received on Fri Sep 01 2006 - 09:39:24 MDT

This archive was generated by hypermail 2.2.0 : Tue Sep 05 2006 - 07:54:05 MDT