[ncl-talk] Legend as a break in curve in a time-series plot

Adam Phillips asphilli at ucar.edu
Wed Nov 14 15:34:04 MST 2018


Hi Tabish,
Yes, see:
http://www.ncl.ucar.edu/Document/Graphics/Resources/xy.shtml#xyLineDashSegLenF
Try a value around .5. The higher the value the more space between labels
on an individual line.
Adam

On Wed, Nov 14, 2018 at 3:26 PM Tabish Ansari <tabishumaransari at gmail.com>
wrote:

> Thanks, it worked.
>
> The only issue now is that since I have 10 lines within a single xy plot,
> it leads to
> several labels overlapping with each other because they're labelled
> exactly at the
> same length intervals.
>
> Long shot but any chances that the user can control this spacing where the
> labels are
> written out for each line?
>
> Thanks
>
> Tabish
> Tabish U Ansari
> PhD student, Lancaster Environment Center
> Lancaster Univeristy
> Bailrigg, Lancaster,
> LA1 4YW, United Kingdom
>
>
> On Wed, 14 Nov 2018 at 22:16, Adam Phillips <asphilli at ucar.edu> wrote:
>
>> Hi Tabish,
>> A good find with xy_14.ncl
>> <http://www.ncl.ucar.edu/Applications/Scripts/xy_14.ncl>, but it looks
>> to me like xyExplicitLabels allows one to put in an array of strings. Thus,
>> did you try something like this: res at xyExplicitLabels = (/"Line 1","Line
>> 2"/)
>> Adam
>>
>> On Wed, Nov 14, 2018 at 2:54 PM Tabish Ansari <tabishumaransari at gmail.com>
>> wrote:
>>
>>> Hi
>>>
>>> I think there's an example on the ncl webpage : xy_14.ncl
>>> but it only explains how to label a single line. I have got 10 lines
>>> in my plot and want to label them as run1, run2, run3.....run10, for
>>> example.
>>>
>>> Cheers,
>>>
>>> Tabish
>>> Tabish U Ansari
>>> PhD student, Lancaster Environment Center
>>> Lancaster Univeristy
>>> Bailrigg, Lancaster,
>>> LA1 4YW, United Kingdom
>>>
>>>
>>> On Wed, 14 Nov 2018 at 21:01, Tabish Ansari <tabishumaransari at gmail.com>
>>> wrote:
>>>
>>>> Hi
>>>>
>>>> I'm creating a time-series plot with 10 curves within it.
>>>> It is difficult to select 10 different colors for these 10 curves
>>>> and then create a corresponding legend, which will also take a lot of
>>>> extra space in the plot.
>>>>
>>>> Is there a way I can just name these curves as a break in them, just
>>>> like
>>>> when you use numbered contours in a contour plot?
>>>>
>>>> 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
>>>
>>
>>
>> --
>> Adam Phillips
>> Associate Scientist,  Climate and Global Dynamics Laboratory, NCAR
>> www.cgd.ucar.edu/staff/asphilli/   303-497-1726
>>
>> <http://www.cgd.ucar.edu/staff/asphilli>
>>
>

-- 
Adam Phillips
Associate Scientist,  Climate and Global Dynamics Laboratory, NCAR
www.cgd.ucar.edu/staff/asphilli/   303-497-1726

<http://www.cgd.ucar.edu/staff/asphilli>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20181114/820f50a2/attachment.html>


More information about the ncl-talk mailing list