help-octave
[Top][All Lists]
Advanced

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

Re: Setting plot ranges


From: Henry F. Mollet
Subject: Re: Setting plot ranges
Date: Fri, 23 Jan 2004 11:20:10 -0800
User-agent: Microsoft-Entourage/10.1.1.2418

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 address@hidden
wrote:

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



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