On 02/03/2018 17:14, Fritz Sonnichsen wrote:
I have played with this for a while. I have been able to plot time
series data in the past but now something has gone wrong. I have
distilled the problem into the short stretch of code below. The data
plots without specifying the time axis, but when I add the time
formatted axis it look find but the data does not appear.
Any ideas?
Thanks
Fritz
======================= CODE ===========================
1;
clear all
fflush(stdin);
xtme=["12:20:39";"12:20:41";"12:20:42";"12:20:43";"12:20:44"];
xT=[ 1 ;2 ;3 ;4 ;5];
plot(xT)
figure
timeFormat='HH:MM:SS';
xdatenum=datenum(xtme,timeFormat); %days from January 0, 0000
xlen = length(xtme);
plot(xdatenum,xT,'color','r');
datetick('x',timeFormat,'keepticks')
axis([0 xlen 0 10])
return
the axis is out of the data range
xdatenum =
7.3706e+05
-----------------------------------------
Join us March 12-15 at CERN near Geneva
Switzerland for OctConf 2018. More info:
https://wiki.octave.org/OctConf_2018
-----------------------------------------