help-octave
[Top][All Lists]
Advanced

[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: Wed, 14 Feb 2018 21:03:17 +0000

Are you sure all the dates are valid and in a sensible range?

On 14 Feb 2018 7:01 pm, "Fritz Sonnichsen" <address@hidden> wrote:
Octave 4.0.0
I am trying to plot a time series data. I found some examples and tried them but they don't seem to work. I have data as shown:
9:00:38      23.9
9:00:39      23.9
.....

My code looks like this:
[dtmeT, T] = textread (filenameT, "%s %f");  %read in the data
   timeFormat='HH:MM:SS';
  ser_date=datenum(dtmeT,timeFormat); %serial date is secs since 1/1/0000
  plot(ser_date,T ,'color','k'  );
  datetick('x',timeFormat,'keepticks')
  xlen = length(dtmeT)  ;
  axis([0 xlen 20 35])

I get a time labeled axis as expected, but I do not see the plot of T.  The data is valid-if I plot it without time formatting it works fine.

thanks
fritz



-----------------------------------------
Join us March 12-15 at CERN near Geneva
Switzerland for OctConf 2018.  More info:
https://wiki.octave.org/OctConf_2018
-----------------------------------------

reply via email to

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