[ncl-talk] custom string labels in time-axis

Tabish Ansari tabishumaransari at gmail.com
Wed Nov 14 15:39:28 MST 2018


Hi Adam,

Thanks for the reply.

The issue here is that I have 10 lines (arrays of length 120 hours) within
a single xy plot
and these arrays don't correspond in time - they have different starting
and ending dates.
Nevertheless, for the purpose of my analysis, I want to show them stacked
over each other
since they're of the same length.

So I need *exactly* these major tickmark labels: "Day1, Day2, Day3, Day4,
Day5" at the 1st, 25th, 49th, 73rd and 97th hours
on the x-axis.


Cheers,

Tabish


Tabish U Ansari
PhD student, Lancaster Environment Center
Lancaster Univeristy
Bailrigg, Lancaster,
LA1 4YW, United Kingdom


On Wed, 14 Nov 2018 at 22:19, Adam Phillips <asphilli at ucar.edu> wrote:

> Hi Tabish,
> Yes, see tickmark example 2 here:
> http://www.ncl.ucar.edu/Applications/tickmarks.shtml#ex2
>
> Note though that the values set in tmXBValues must be within the range of
> times specified in the x-input in gsn_csm_xy. For example, if you create
> your plot like this:
> plot(1) = gsn_csm_xy(wks,ispan(1950,2005,1),arr,res)
> your times run from 1950 to 2005, and your tmXBValues need to be set
> within that range.
>
> If you have any further questions let ncl-talk know.
> Adam
>
>
> On Wed, Nov 14, 2018 at 3:13 PM Tabish Ansari <tabishumaransari at gmail.com>
> wrote:
>
>> Hi
>>
>> I'm plotting arrays of length 120 through gsn_csm_xy() function.
>> I've been using time_axis_labels function before but this time it's a
>> slightly different
>> situation and I want my x-axis to be labelled as:
>> Day1, Day2, Day3, Day4, Day5
>> every 24th hour along the 120 hours.
>>
>> Is it possible to do this?
>>
>> 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>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20181114/7da34485/attachment.html>


More information about the ncl-talk mailing list