help-octave
[Top][All Lists]
Advanced

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

Re: Simple Time Formatted Plot Problem


From: Fritz Sonnichsen
Subject: Re: Simple Time Formatted Plot Problem
Date: Fri, 2 Mar 2018 12:05:50 -0500
User-agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.6.0

Thanks-

Replacing the last few lines with the ones below does not work either:
dmin= min(xdatenum)
dmax= max(xdatenum)
axis([dmin dmax 0  10])

Nor does removing the axis statement altogether
Fritz


On 3/2/2018 11:32 AM, Marco Atzeri wrote:
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
-----------------------------------------




reply via email to

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