help-octave
[Top][All Lists]
Advanced

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

Re: multiplot scripts ... update


From: niles
Subject: Re: multiplot scripts ... update
Date: Mon, 03 Jul 95 18:04:03 -0400

Vinayak, Yes! That worked! Thank you!

What I meant by "working like Matlab subplot" is that one doesn't need
to have an explicit multiplot command and subplot is of the form
subplot(xyz) where x= # of rows, y = # of cols, and z = which position
in the grid you want to plot to next, counting from left to right, top
to bottom.  Also one could use the syntax subplot(xyz) or
subplot(x,y,z). Also, Ideally the plots would appear as you command
them and there would be no need for a "oneplot" command, just use
subplot(111).

Actually, I think you could probably change subplot so it does
everything, your routines currently do.  So the example would be...

subplot(221)  % This will set for multiplot mode with 2x2 and go to position
              % number 1. (top-left)
plot(x,y)

subplot(222)  % This will move to position #2 (top-right)

plot(x,y)

subplot(2,2,3)  % this syntax works to move to position #3. (bottom-left)

plot(x,y)

subplot(111)  % This does the job of oneplot. Hopefully in future verisions
              % of Octave it could be un-needed.

-----------------

What do you think?....keeps the number of routines down.

Here's my code to handle the "xyz" decoding....("mnp" here)

%%%%%
m = fix(mnp/100);
n = fix((mnp-100*m)/10);
p = mnp-100*m-10*n;
if (p > m*n)
   error('p must be less than m*n')
end
%%%%%%

And then use nargin to figure the other syntax.

        Rick Niles.


reply via email to

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