[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Problem plotting time on X axis

From: Ian McCallion
Subject: Re: Problem plotting time on X axis
Date: Thu, 15 Feb 2018 18:08:14 +0000


Part of the problem was that in your original question the comment was
    ser_date=datenum(dtmeT,timeFormat); %serial date is secs since 1/1/0000
It should have been
    ser_date=datenum(dtmeT,timeFormat); %serial date is days since 1/1/0000

Good example of comments causing bugs!!


On 15 February 2018 at 17:32, Przemek Klosowski
<address@hidden> wrote:
> On 02/15/2018 09:34 AM, Fritz Sonnichsen wrote:
> thanks for responding--See Ian's post--that fixed the problem-I was not
> seeing any plot line despite the fact that the X labels looked appropriate.
> Right---Ian removed the large integer number by rem(), and I did the same
> thing by subtracting the midnight date. Numerically, in our simple example
> they amount to the same thing, except that if your data covered several
> days, rem() would collapse them onto each other, whereas subtracting the
> midnight would allow you to plot more than one day.
> plot(ser_date-datenum("00:00:00"),T ,'color','k' )
> -----------------------------------------
> Join us March 12-15 at CERN near Geneva
> Switzerland for OctConf 2018.  More info:
> -----------------------------------------

reply via email to

[Prev in Thread] Current Thread [Next in Thread]