Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

Thread Subject:
Updating two separate figures

Subject: Updating two separate figures

From: Elnaz

Date: 22 Oct, 2012 18:50:13

Message: 1 of 3

Dear all,

I want to update two separate plots in two nested loops; like this:
for i=1:100
     plot(...); drawnow;
     for j=1:100
         plot(...); drawnow;
     end
end
How can I do this? I don't want to open a new figure at each iteration.

Thanks,
Elnaz

Subject: Updating two separate figures

From: Elnaz

Date: 22 Oct, 2012 19:03:13

Message: 2 of 3

Also, I don't want to use subplot but two separate figures.

Thanks,
Elnaz

Subject: Updating two separate figures

From: someone

Date: 22 Oct, 2012 19:34:15

Message: 3 of 3

"Elnaz " <ebsadeghian@gmail.com> wrote in message <k6459h$eag$1@newscl01ah.mathworks.com>...
> Also, I don't want to use subplot but two separate figures.
>
> Thanks,
> Elnaz

doc hold

% "hold on" retains the current plotand certain axes properties so that subsequent graphing commands add to the existing graph.

plot(...)
hold on
plot(...)
plot(...)
...

Tags for this Thread

What are tags?

A tag is like a keyword or category label associated with each thread. Tags make it easier for you to find threads of interest.

Anyone can tag a thread. Tags are public and visible to everyone.

Contact us