help-octave
[Top][All Lists]
Advanced

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

Re: Setting plot ranges


From: Christoph Dalitz
Subject: Re: Setting plot ranges
Date: Fri, 23 Jan 2004 09:32:03 +0100

On Thu, 22 Jan 2004 15:45:47 -0700
Joe Koski <address@hidden> 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
-------------------------------------------------------------



reply via email to

[Prev in Thread] Current Thread [Next in Thread]