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

Tabish Ansari tabishumaransari at gmail.com
Wed Jun 20 14:26:01 MDT 2018


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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20180620/1521c33b/attachment.html>


More information about the ncl-talk mailing list