[Top][All Lists]

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

Re: Problem plotting time on X axis

From: Fritz Sonnichsen
Subject: Re: Problem plotting time on X axis
Date: Thu, 15 Feb 2018 09:33:53 -0500
User-agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.7.0

Thanks Ian! This solved the problem. I guess the main point was that I need to remove the whole number offset from the serial date.

On 2/15/2018 8:46 AM, Ian McCallion wrote:
Hi Fritz,

I think this is what you want:

  dtmeT = {"9:00:38" "9:00:39" "9:00:40" "9:00:41"}
  T = [   23.900    23.900   22.900   21.100]

  plot(ser_date,T ,'color','k'  );
  axis([-Inf Inf 20 75]);

Cheers... Ian

On 14 Feb 2018 9:37 pm, "Fritz Sonnichsen" <address@hidden> wrote:
Thanks Ian.
The seem to be in proper sequence. I am not asking you to do my work but to see this it may be easiest to just run this code below:

clear all
[dtmeT, T] = textread (filenameT, "%s %f");

%%%%%%%%%%  TEMPERATURE PLOT %%%%%%%%%%%%%%%
  ser_date=datenum(dtmeT,timeFormat); %serial date is secs since 1/1/0000
  plot(ser_date,T ,'color','k'  );
%  plot(ser_date-datenum("00:00:00"),T ,'color','k' )
    xlen = length(dtmeT);
  axis([0 xlen 20 75])

==============DATA ="">==
14:30:06    22.8
14:30:07    22.8
14:30:08    22.8
14:30:09    22.8
14:30:10    22.8
14:30:11    22.7
On 2/14/2018 4:03 PM, Ian McCallion wrote:
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
  ser_date=datenum(dtmeT,timeFormat); %serial date is secs since 1/1/0000
  plot(ser_date,T ,'color','k'  );
  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.


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]