help-octave
[Top][All Lists]
Advanced

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

Re: Time xdata plot


From: Dirk Eddelbuettel
Subject: Re: Time xdata plot
Date: Thu, 19 Jun 2003 13:06:36 -0500
User-agent: Mutt/1.3.28i

On Thu, Jun 19, 2003 at 07:55:03PM +0200, Michael Hindley wrote:
> What is the structure of a string array for a time function plot ?
> Here is my test program which does not run
>  
> a=['20030101'
>    '20030102'
>    '20030103'];
> b=[1 2 3];
> gset xdata time
> gset timefmt "%Y%m%d" 
> plot(a,b);
> 
> The error's
> 
> error: mapper: wrong type argument `string'
> error: evaluating argument list element number 1
> error: evaluating index expression near line 40, column 12
> error: evaluating argument list element number 1
> error: evaluating index expression near line 40, column 7
> error: if: error evaluating conditional expression
> error: evaluating if command near line 40, column 3
> error: called from `__plt2__' in file
> `/usr/share/octave/2.1.36/m/plot/__plt2__.m'
> error: called from `__plt__' in file
> `/usr/share/octave/2.1.36/m/plot/__plt__.m'
> error: called from `plot' in file
> `/usr/share/octave/2.1.36/m/plot/plot.m'
> error: near line 7 of file
> `/home/makke/stock_market/octave_devel/develop/test.m'

It's been years since I did that, but IIRC octave converts the  20030101 to
scientific notation (eg 2.003e7) so that your otherwise correct gnuplot code
fails. You may need to do this explicitly (i.e. save you data, run gnuplot
manually on it and then transfer the working gnuplot code back inside octave).

Dirk


-- 
Don't drink and derive. Alcohol and analysis don't mix.



-------------------------------------------------------------
Octave is freely available under the terms of the GNU GPL.

Octave's home on the web:  http://www.octave.org
How to fund new projects:  http://www.octave.org/funding.html
Subscription information:  http://www.octave.org/archive.html
-------------------------------------------------------------



reply via email to

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