From help-octave-request at bevo dot che dot wisc dot edu Fri Jan 23 02:46:36 2004 Subject: Re: Setting plot ranges From: Christoph Dalitz To: Joe Koski Cc: geordie dot mcbain at aeromech dot usyd dot edu dot au, help-octave@bevo.che.wisc.edu Date: Fri, 23 Jan 2004 09:32:03 +0100 On Thu, 22 Jan 2004 15:45:47 -0700 Joe Koski wrote: > > > > -*- > > x = (0:100)'; > > y(end) *= 100; > > Ymax = 2*mean (y); > > graw (sprintf ("set yrange [0:%g]\n", Ymax)); > > plot (x, y); > > -*- > > > > > OK, so you need to send the command to gnuplot directly, via the "back > door." > It is also possible on the higher octave-only level: cmd = sprintf("gset yrange [0:%g]\n", Ymax); eval(cmd); The underlying problem is that octave needs to parse the gnuplot command and cannot distinguish between userdefined variables and gnuplot keywords. Christoph ------------------------------------------------------------- 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 -------------------------------------------------------------