From help-octave-request at bevo dot che dot wisc dot edu Mon Jan 5 15:58:55 2004 Subject: Re: plotting to Postscript doesn't work? From: Bart Vandewoestyne To: Geraint Paul Bevan Cc: help-octave at bevo dot che dot wisc dot edu Date: Mon, 05 Jan 2004 22:58:16 +0100 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: mc303 at forsythe:~$| dpkg --list 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 -------------------------------------------------------------