[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: plot with vectors
From: 
John W. Eaton 
Subject: 
Re: plot with vectors 
Date: 
Fri, 22 Apr 2005 14:46:13 0400 
On 22Apr2005, Hamish Allan <address@hidden> wrote:
 Sorry, I should really have elaborated. From within Octave:

 octave:1> a = randn(10,4);
 octave:2> gplot a with vector
 octave:3> line 0: Not enough columns for this style
 octave:3> save a.dat a

 But from within Gnuplot:

 gnuplot> plot "a.dat" with vector

 works fine.

 Any ideas?
I'm guessing you are not using 2.1.69 or the 2.9.x series, because
those versions would tell you that gplot is obsolete.
In 2.9.x, you can use
__gnuplot_plot__ a with vector
because the plot command is only subject to minimal parsing (to
recognize the data comes from "a") and then the rest of the command is
passed on to gnuplot unchanged.
In the 2.1.x and earlier versions of Octave, gplot did a lot more
parsing, so adding support for things like "with vector" meant
changing the parser, which was a lot of work that no one was willing
to do. Also, since gnuplot is a moving target, even if someone were
willing to do the work, Octave was likely to be out of sync with
gnuplot most of the time anyway.
In any case, even the new __gnuplot_*__ functions are really only for
use as internal commands. If you need vector plots, you should write
a higherlevel plot routine that does what you need. If the
higherlevel function needs to use __gnuplot_plot__, then at least it
is isolated to one function.
jwe

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
