[ncl-talk] create fewer explicit legend labels in xy-plot

Rashed Mahmood rashidcomsis at gmail.com
Wed Jun 20 16:38:33 MDT 2018


Easiest "tric" would be to set:
res at xyExplicitLegendLabels =
(/"obs","baseline","pulse","","","","","","","","",""/)


Does this work? There are several other ways to get this done, let me know
if this does not work.



On Wed, Jun 20, 2018 at 1:26 PM, Tabish Ansari <tabishumaransari at gmail.com>
wrote:

> Hi
>
> I have a time-series with 12 different datasets plotted together in a
> single xy plot.
>
> The color looks something like:
> res at xyLineColors      = (/"black","blue","red","red","
> red","red","red","red","red","red","red","red" /)
>
> And the labeling is currently:
> res at xyExplicitLegendLabels = (/"obs","baseline","pulse18","
> pulse19","pulse20","pulse21","pulse22","pulse23","pulse24","pulse25","pulse26","pulse27"/)
>
>
> However, I do not want all the labels. Since all the "pulse" data are red
> in color, I just want to draw a single red legend with a name "pulse".
> If I do something like: res at xyExplicitLegendLabels =
> (/"obs","baseline","pulse"/) , NCL still uses default legend names for all
> the remaining data.
> I do not want that. Is there a way to only draw 3 legends when the data
> itself has more than 3 arrays within it?
>
> Thanks
>
> Tabish
>
>
> Tabish U Ansari
> PhD student, Lancaster Environment Center
> Lancaster Univeristy
> Bailrigg, Lancaster,
> LA1 4YW, United Kingdom
>
> _______________________________________________
> ncl-talk mailing list
> ncl-talk at ucar.edu
> List instructions, subscriber options, unsubscribe:
> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20180620/b86b9637/attachment.html>


More information about the ncl-talk mailing list