Re: gsnYRefLine and gsn_csm_xy2

From: Mary Haley (haley AT ucar.edu)
Date: Tue Sep 20 2005 - 10:32:38 MDT

  • Next message: Mary Haley: "Re: gsnYRefLine and gsn_csm_xy2"

    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
    >



    _______________________________________________
    ncl-talk mailing list
    ncl-talk@ucar.edu
    http://mailman.ucar.edu/mailman/listinfo/ncl-talk



    This archive was generated by hypermail 2b29 : Tue Sep 20 2005 - 11:02:41 MDT