Re: Order of legends

From: Mary Haley <haley_at_nyahnyahspammersnyahnyah>
Date: Fri, 23 May 2008 16:57:02 -0600 (MDT)

Saji,

I had to double-check, but there's no way to reverse the automatic
legend.

You can, of course, create your own legend with gsn_legend_ndc or
gsn_create_legend. See examples 6 and 8 at:

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

Meanwhile, we're looking into how easy it would be to add the
capability to reverse an automatic legend. Seems like a reasonable
thing to want to do!

--Mary

On Fri, 23 May 2008, Saji N. Hameed wrote:

> Dear All,
>
> It seems to me that the order of legend labels are managed internally
> by NCL. This is giving me some trouble with a script we are developing.
> In the script we have a certain ordering of data, for instance
>
> data(0,:)=u1
> data(1,:)=v1
> data(2,:)=u2
> data(3,:)=v2
>
> When plotted, I expect the legends to be ordered (u1,v1,u2,v2).
> However they come out in the reverse order (v2,u2,v1,u1). This behaviour
> can also be seen in the following examples posted in the NCL website.
>
> http://ncl.ucar.edu/Applications/Images/leg_5_lg.png
> http://ncl.ucar.edu/Applications/Images/leg_8_lg.png
> (the order of legends are reversed in both plots compared to
> the ordering of the data).
>
> Also compare http://ncl.ucar.edu/Applications/Images/leg_4_lg.png with
> http://ncl.ucar.edu/Applications/Images/leg_5_lg.png
>
> Is there a way to control the ordering of legends?
>
> thanks,
> saji
> _______________________________________________
> ncl-talk mailing list
> ncl-talk_at_ucar.edu
> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
>
_______________________________________________
ncl-talk mailing list
ncl-talk_at_ucar.edu
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Fri May 23 2008 - 16:57:02 MDT

This archive was generated by hypermail 2.2.0 : Tue May 27 2008 - 15:12:16 MDT