Re: gsnYRefLine and gsn_csm_xy2

From: Saji Hameed (saji AT hawaii.edu)
Date: Tue Sep 20 2005 - 14:47:55 MDT

  • Next message: Colleen Henry: "integers from a string"

    Hi Mary,

    Thank you for providing a solution to this problem. We had only set
    resL@trXMinF and resL@trXMaxF to the appropriate values when we first
    encountered this problem. Setting also resR@trXMinF and resR@trXMaxF
    resolved the problem.

    Thanks once again.

    saji
    ....
    Saji N. Hameed, Assistant Researcher,
    IPRC-SOEST, 2525 Correa Road, Univ. of Hawaii,
    Honolulu, HI 96822, U.S.A
    http://iprc.soest.hawaii.edu/~saji
    tel.: (808) 956 9534 , fax.: (808) 956 9425

    ----- Original Message -----
    From: Mary Haley <haley@ucar.edu>
    Date: Tuesday, September 20, 2005 9:16 am
    Subject: Re: gsnYRefLine and gsn_csm_xy2

    > Hi Saji,
    >
    > Another user responded to me offline and said he had the same problem.
    > We iterated back and forth on this, and found that if you set the
    > following:
    >
    > resR@trXMinF = min(time)
    > resR@trXMaxF = max(time)
    > resL@trXMinF = min(time)
    > resL@trXMaxF = max(time)
    >
    > you should get the same results as I do.
    >
    > With the next release of NCL and the gsn** scripts (which will
    > probablybe no sooner than a month), you won't need to set these
    > resources.
    > --Mary
    >
    > On Tue, 20 Sep 2005, Mary Haley wrote:
    >
    > >
    > > Hi,
    > >
    > > Can you explain what you mean by "shifted by an arbitrary distance"?
    > > I am not seeing this behavior when I run your sample script.
    > >
    > > Maybe what you are talking about is that the X axis in the first
    > plot> is going from 0 to 21, and in the second plot it goes from 1
    > to 20.
    > > This is because when you add a reference line, it sets the
    > > trXMinF/trXMaxF resources to the exact min/max of the X data so that
    > > the plot looks nicer.
    > >
    > > I've attached a PS file that shows the results I get. Please
    > compare it
    > > with yours and let me know if they are different.
    > >
    > > --Mary
    > >
    > > -------------------------------------------------
    > > Mary Haley haley@ucar.edu
    > > NCAR/SCD/VETS 303-497-1254 (voice)
    > > 1850 Table Mesa Dr 303-497-1239 (fax)
    > > Boulder, CO 80305
    > > -------------------------------------------------
    > >
    > > On Mon, 19 Sep 2005, Saji N. Hameed wrote:
    > >
    > >> Hello,
    > >>
    > >> A colleague of mine encountered an unexpected behavior when he
    > used the
    > >> attribute gsnYRefline along with gsn_csm_xy2 -- one of the two
    > line plots
    > >> was shifted by an arbitrary distance.
    > >>
    > >> To illustrate the problem, consider the following code:
    > >>
    > >> ;!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
    > >>
    > >> time=ispan(1,20,1)
    > >> x=cos(time)
    > >> y=20*cos(time)
    > >>
    > >> wks = gsn_open_wks("x11","xy")
    > >> resL = True
    > >> resR = True
    > >> resR@xyDashPatterns = 1
    > >>
    > >> plot = gsn_csm_xy2(wks,time,x,y,resL,resR)
    > >>
    > >> ; If you add the attribute gsnYRefLine, the behavior is unexpected.
    > >>
    > >> resL@gsnYRefLine = 0.0
    > >> plot = gsn_csm_xy2(wks,time,x,y,resL,resR)
    > >> ;!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
    > >>
    > >> Is this a feature or a bug?
    > >>
    > >> NCAR Command Language Version 4.2.0.a032
    > >> Operating System (Linux, also encountered the bug on NCL running
    > >> on Mac OS:Tiger)
    > >>
    > >> saji
    > >> .....
    > >>
    > >> Saji N. Hameed
    > >> Assistant Researcher
    > >> International Pacific Research Center,
    > >> 2525 Correa Road, Honolulu, HI 96822
    > >>
    > >> _______________________________________________
    > >> ncl-talk mailing list
    > >> ncl-talk@ucar.edu
    > >> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
    > >
    >



    This archive was generated by hypermail 2b29 : Wed Sep 21 2005 - 09:19:11 MDT