From help-octave-request at bevo dot che dot wisc dot edu Thu Jan 22 16:42:32 2004 Subject: Re: Setting plot ranges From: "Henry F. Mollet" To: Joe Koski , Octave_post Date: Thu, 22 Jan 2004 14:37:34 -0800 Below adjusts x-scale and y-scale in a graph which plots all eigenvalues of a matrix in the complex plane. I hope it can be adjusted to what you need. In this example the matrix is a 10x10. whos rwd complex matrix 10 1 la which came from: [w,la]=eig(A); la=diag(la); imax=find (la==max(real(la))); % did not work if la1 = la2, had to add "real" v=conj(inv(w)); Cut several gset commands axis "square" % trying rounding up to next 0.1 temp=0.1* ceil (10*la(imax)); axis ([-temp temp -temp temp]); title ("Eigenvalues in complex plane") plot (la, "*") Henry on 1/22/04 1:35 PM, Joe Koski at jkoski11 at comcast dot net wrote: > In a recent exercise, because of some extreme "outliers," I needed to > override the vertical axis of a plot with gset yrange. I had been entering > this range "manually" e. g., gset yrange [0:10], but the scale varied from > plot to plot, so I decided to automate the process by calculating a maximum > that filtered out the extreme values. > > It appears that you can't enter a real (or string) variable such as > > Ymax = 2.0*mean(y); > S_Ymax = num2str(Ymax); > > into the gset yrange [0:Ymax] or gset yrange [0:S_Ymax] command. Octave just > tells me that Ymax or S_Ymax are undefined. > > Is there trick to doing this, or must plot ranges be entered only > numerically, without the use of variable names? > > Thanks for the advice. > > Joe Koski > > > > ------------------------------------------------------------- > 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 -------------------------------------------------------------