help-octave
[Top][All Lists]
Advanced

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

Re: problem with plot / hold


From: Louis Pecora
Subject: Re: problem with plot / hold
Date: Thu, 25 May 2006 12:12:43 -0400
User-agent: Thunderbird 1.5.0.2 (Macintosh/20060308)

Javier Arantegui wrote:
Hi,

I haven't used Matlab in my life, so I don't know if this solution will work in Matlab.

El Jueves, 25 de Mayo de 2006 12:16, Matthias Brennwald escribió:
In Matlab, these commands to exactly what I want. In Octave, however,
the second plot contains all three data sets instead of only the
third set.

The solution is very easy:

subplot(2,1,1);     % open up the first plot
plot(rand(1,10));   % plot the first data set to the first plot
hold on             % hold the plot
plot(rand(1,10));   % plot the second data to the first plot

hold off
subplot(2,1,2);     % open up the second plot
plot(rand(1,10));   % plot the third data set to the second plot

Javier
That doesn't work on my Mac (PowerBook G4, OS X 10.4, Octave 2.1.53). I get all three plots in the 2nd subplot.

--
Cheers,

Lou Pecora

Code 6362
Naval Research Lab
Washington, DC  20375
USA
Ph:  +202-767-6002
email:  address@hidden



reply via email to

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