[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Octave plot on time/date x-axis
From: |
Bill Denney |
Subject: |
Re: Octave plot on time/date x-axis |
Date: |
Mon, 15 Sep 2008 18:46:28 -0400 |
User-agent: |
Thunderbird 2.0.0.16 (Windows/20080708) |
Ivan Sutoris wrote:
>> I would like to plot a data set that has dates and time in the x-axis. I
>> have found the following code, but when I enter it i get a parse error:
>> syntax error.
>>
>> __gnuplot_set xdata time
>> __gnuplot_set timefmt "%d/%m"
>> __gnuplot_set format x "%b %d"
>>
>
> I think Octave no longer allows to directly access gnuplot, so these
> commands won't work. I don't know if there is some simple way to have
> dates as tick labels, but you can always set tick labels manually,
> like this:
>
> data = [2 3 5 3.5 6];
> datalabels = {'10/3/2008','10/4/2008','10/5/2008','10/6/2008','10/7/2008'};
> % cell array
> plot(data)
> set(gca(),'xticklabels',datalabels)
If you install the financial package, you can use the dateaxis command
which likely does what you're wanting to do.
Have a good day,
Bill
- Octave plot on time/date x-axis, djacobson, 2008/09/15
- Re: Octave plot on time/date x-axis, Ivan Sutoris, 2008/09/15
- Re: Octave plot on time/date x-axis,
Bill Denney <=
- Re: Octave plot on time/date x-axis, David Bateman, 2008/09/16
- Re: Octave plot on time/date x-axis, Bill Denney, 2008/09/16
- [changeset]: Re: Octave plot on time/date x-axis, David Bateman, 2008/09/16
- [changeset]: Re: Octave plot on time/date x-axis, John W. Eaton, 2008/09/17
- Re: [changeset]: Re: Octave plot on time/date x-axis, dbateman, 2008/09/17
- Re: [changeset]: Re: Octave plot on time/date x-axis, John W. Eaton, 2008/09/17