Thread Subject:
drawnow and hold on together?

Subject: drawnow and hold on together?

From: Elnaz

Date: 3 Oct, 2012 16:50:08

Message: 1 of 2

Hi all,

Can we use "hold on" and "drawnow" together in one plot?
I want to have a curve #1 fixed and then frequently update a curve #2 against the first one. How should I do that?

Thanks,
Elnaz

Subject: drawnow and hold on together?

From: dpb

Date: 3 Oct, 2012 17:02:48

Message: 2 of 2

On 10/3/2012 11:50 AM, Elnaz wrote:
> Hi all,
> Can we use "hold on" and "drawnow" together in one plot?
> I want to have a curve #1 fixed and then frequently update a curve #2
> against the first one. How should I do that?

Read the section on "Animation" in the Graphics documentation.

For that kind of operation set()'ing the YData array of the second curve
will be much faster than redrawing the whole plot.

There's no magic about 'hold' and 'drawnow' other than using them at the
proper time(s) to get the effect desired. Setting the actual data using
the object handle eliminates the need for drawnow anyway, in most cases
at least.

--

Tags for this Thread

Everyone's Tags:

Add a New Tag:

Separated by commas
Ex.: root locus, bode

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.

Tag Activity for This Thread
Tag Applied By Date/Time
plotting problem Elnaz 3 Oct, 2012 12:54:11
rssFeed for this Thread

Contact us