help-octave
[Top][All Lists]
Advanced

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

Re: plotting to Postscript doesn't work?


From: Bart Vandewoestyne
Subject: Re: plotting to Postscript doesn't work?
Date: Mon, 05 Jan 2004 22:58:16 +0100
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.5) Gecko/20031107 Debian/1.5-3

Geraint Paul Bevan wrote:

Sorry, just noticed you asked about labelling lines, not axes. If you
have octave-forge installed, you can use legend to label the individual
lines:

octave:1> plot (sin (0:10))

Hmm... first of all, does the above line really work for you?  I get:

octave:1> plot (sin (0:10))
error: octave_base_value::array_value(): wrong type argument `range'
error: evaluating argument list element number 1

octave:2> legend (sprintf("hello world %d", 6))

About the 'legend' command: i think i have octave-forge correctly installed on my Debian box, because:

address@hidden:~$ dpkg --list | grep octave-forge
ii octave-forge 2003.06.02-8 Contributed functions for GNU Octave from ht

If you don't have octave forge, you can do similar things with
eval (sprintf ("plot (sin(0:10), ';hello world %d;')", 8))

OK, i have to change this to:

octave:1> t=[0:0.1:2*pi]
octave:2> eval (sprintf ("plot (t, sin(t), ';hello world %d;')", 8))

to make it work, but it works :-)  Thanks!

Greetzzz,
Bart

--
Bart Vandewoestyne                    Bart.Vandewoestyne_at_pandora.be
Naamsesteenweg 328 bus 201                     GSM: +32 (0)478 397 697
B-3001 Heverlee                          http://osswin.sourceforge.net
----------------------------------------------------------------------
"Theory is the general; experiments are the soldiers." (Leonardo da Vinci)



-------------------------------------------------------------
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]