[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: problem with plot / hold
From: |
Ronald Crummett |
Subject: |
Re: problem with plot / hold |
Date: |
Thu, 25 May 2006 07:34:03 -0700 |
Matthias -
If you are using two different plot windows to plot the data, you can
always use the 'clf' command before plotting to the second window.
This works in Matlab too.
-Ron
----- Original Message -----
From: Matthias Brennwald <address@hidden>
Date: Thursday, May 25, 2006 3:35 am
Subject: problem with plot / hold
To: address@hidden
> 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
>
>
>
> _______________________________________________
> Help-octave mailing list
> address@hidden
> https://www.cae.wisc.edu/mailman/listinfo/help-octave
>