Re: a question regarding scatter plot

From: Mary Haley <haley_at_nyahnyahspammersnyahnyah>
Date: Fri Apr 01 2011 - 09:13:30 MDT

On Mar 31, 2011, at 5:06 PM, H.Dang wrote:

> Hi dear all,
>
> I have a question regarding a scatter plot example on NCL website:
>
> http://www.ncl.ucar.edu/Applications/Scripts/scatter_4.ncl
>
> The last 2 lines are:
>
> plot = gsn_csm_xy (wks,ts&time,data,res) ; create plot
> end
>
> The "&time" doesn't work in my NCL, but I can get plots simply use:
>
> plot = gsn_csm_xy (wks,ts,data,res) ; create plot
> end
>
> I'm not sure if it's okay if I do it this way.

Dear Hongyan,

It's okay to put "ts" there, as long as the dimensions of ts and data
are correct, and that this is what you actually want to plot.
This call will simply put the "ts" values on your X axis and the
"data" values on your Y axis.

> And is the x-axes is the pre-defined "x"?
>
> x = ispan(0,dimsizes(ts)-1,1)*1.

No, it should be set to the values of "ts". That is, the X values
will span min(ts) to max(ts).

If you had used:

      plot = gsn_csm_y(wks,data,res) ; Note, no "ts"

Then "data" would be on your Y axis, and the x axis would be the
"ispan" values as you defined above.

--Mary

>
> Thank you.
> --
> Cordially,
> Hongyan(鸿雁)
> Tel: 1-519-8884567ext36667
>
>
> _______________________________________________
> 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 Fri Apr 1 09:13:43 2011

This archive was generated by hypermail 2.1.8 : Tue Apr 05 2011 - 09:01:21 MDT