From help-octave-request at bevo dot che dot wisc dot edu Fri Jan 23 13:24:47 2004 Subject: Re: Setting plot ranges From: "Henry F. Mollet" To: Christoph Dalitz , Joe Koski CC: , Octave_post Date: Fri, 23 Jan 2004 11:20:10 -0800 I suggested the much simpler axis ([Xmin Xmax Ymin Ymax]); % as per MATLAB, I believe Is the problem here that I have to give all 4 values and there is no way to use Ymax only and default values for the rest? graw (sprintf ("set yrange [0:%g]\n", Ymax)); cmd = sprintf("gset yrange [0:%g]\n", Ymax); eval(cmd); Why is the first command lower-level (gnuplot?) and the next two commands higher level-octave? Henry on 1/23/04 12:32 AM, Christoph Dalitz at christoph dot dalitz at hs-niederrhein dot de wrote: > 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 > ------------------------------------------------------------- ------------------------------------------------------------- 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 -------------------------------------------------------------