help-octave
[Top][All Lists]
Advanced

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

problem with plot / hold


From: Matthias Brennwald
Subject: problem with plot / hold
Date: Thu, 25 May 2006 12:16:53 +0200

Dear all,

I'm running Octave 2.1.72 and Mac OS X with gnuplot 4.0.

I want to plot three data sets in two plots (using subplot). The first two data sets should appear in the same plot, whereas the third data set should appear in its own plot (without the other two data sets). Consider the following commands to plot the three (fake) data sets:

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
subplot(2,1,2);     % open up the second plot
plot(rand(1,10));   % plot the third data set to the second plot

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. I also tried to sepearate the plots into two different X11 windows instead of two subplots (using 'figure(1)' and 'figure(2)' instead of the subplot commands above). Same problem.

Where's my mistake?

Is there a way to make my code 'universal' such that it runs as intended both with Matlab and Octave?

Matthias


-------
Matthias Brennwald
Lägernstrasse 6
CH 8037 Zürich
+41 (0)44 364 17 03
address@hidden





reply via email to

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