Re: xy plot with different x axis which has different dimension ?

From: Mary Haley <haley_at_nyahnyahspammersnyahnyah>
Date: Wed Aug 10 2011 - 08:48:49 MDT

Hi Ufuk,

There are three ways you can do this. See example xy_25.ncl at:

http://www.ncl.ucar.edu/Applications/xy.shtml

This uses a function NhlAddData to add XY data (of any size) to an
existing XY plot.

The other way to do it is to simply add the new curve using
gsn_add_polyline.

The first method is better if you need to turn on a legend, as both
curves will be included.

The third way is to make an array that's big enough to hold your
largest data array, and fill in the remaining values with missing
values.

--Mary

On Aug 10, 2011, at 4:38 AM, Ufuk Utku Turuncoglu (BE) wrote:

> Hi,
>
> I try to create a XY plot which has two Y axis. I know that
> "gsn_csm_xy2" can be used for it but in my case the X axis is also
> different (a part of the X axis is in the same range). I found that
> gsn_csm_x2y2 can be used but it gives the following error,
>
> (0) gsn_csm_xy: Fatal: X and Y must have the same dimensions sizes,
> or one must be one-dimensional and both have the same rightmost
> dimension.
> (0) gsn_csm_xy: Fatal: X and Y must have the same dimensions sizes,
> or one must be one-dimensional and both have the same rightmost
> dimension.
>
> As i understand the length or dimension size of the X axis must be
> same
> for both plot. In my case the size of the X axis is also different. Is
> there any example for it? If not, a possible solution can be creating
> new X axis that merges the both of them but in this case the both data
> arrays must be rearranged based on the new X axis. Any suggestions are
> welcome.
>
> Regards,
>
> --ufuk
>
>
> _______________________________________________
> 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 Wed Aug 10 08:48:54 2011

This archive was generated by hypermail 2.1.8 : Fri Aug 12 2011 - 11:48:30 MDT