Thread Subject: drawnow expose

Subject: drawnow expose

From: Joerg Hackinger

Date: 17 Jun, 2008 12:36:02

Message: 1 of 4

I have a figure with some patches. And i change some of the
patches in a loop (using set).
I have to insert the drawnow, that the figure will be
redrawn. But with drawnow, the entire figure will be redrawn.

Is there a possibility to redraw only the changed patches?

I thought about drawnow expose, but nothing happens with
that function.
The Matlab help says about drawnow expose:
drawnow expose causes only graphics objects to refresh, if
needed.
But how does drawnow expose decide, which objects are needed
to be updated?

Subject: drawnow expose

From: roberson@ibd.nrc-cnrc.gc.ca (Walter Roberson)

Date: 17 Jun, 2008 13:16:38

Message: 2 of 4

In article <g38b3i$cjs$1@fred.mathworks.com>,
Joerg Hackinger <hac@rz.fh-augsburg.de> wrote:
>I have a figure with some patches. And i change some of the
>patches in a loop (using set).
>I have to insert the drawnow, that the figure will be
>redrawn. But with drawnow, the entire figure will be redrawn.

>Is there a possibility to redraw only the changed patches?

No.


>I thought about drawnow expose, but nothing happens with
>that function.
>The Matlab help says about drawnow expose:
>drawnow expose causes only graphics objects to refresh, if
>needed.
>But how does drawnow expose decide, which objects are needed
>to be updated?

drawnow() normally also consults the event loop to determine
whether there are events to process such as callbacks.
drawnow('expose') tells drawnow to pay attention only to pending
internal graphics events -- but it pays attention to all of them.

--
  "You may comand nature to the extent only in which you are willing to
  obey her." -- Walter Russell

Subject: drawnow expose

From: Michael Garrity

Date: 17 Jun, 2008 13:46:52

Message: 3 of 4


"Joerg Hackinger" <hac@rz.fh-augsburg.de> wrote in message news:g38b3i$cjs$1@fred.mathworks.com...
>I have a figure with some patches. And i change some of the
> patches in a loop (using set).
> I have to insert the drawnow, that the figure will be
> redrawn. But with drawnow, the entire figure will be redrawn.
>
> Is there a possibility to redraw only the changed patches?
>
> I thought about drawnow expose, but nothing happens with
> that function.
> The Matlab help says about drawnow expose:
> drawnow expose causes only graphics objects to refresh, if
> needed.
> But how does drawnow expose decide, which objects are needed
> to be updated?
>
The set command is keeping track of which objects need to
be updated. It isn't as simple as it might appear though. In
some cases, changing one object means that others have to
be updated. A common case is when the Axes object's
{X/Y/Z}LimMode properties are set to auto. When you
change one of the objects in the Axes, then that can cause
the limits to change which can cause all of the other objects
in the Axes to require updating.

As the other responder said, the expose option on drawnow
is just about controlling what types of events get processed
during the drawnow.

  - Mike Garrity
  - The MathWorks, Inc.

Subject: drawnow expose

From: Joerg Hackinger

Date: 18 Jun, 2008 06:22:01

Message: 4 of 4

Thanks for the answers.
It is good to know, that matlab is not able to do it, so i
dont have to search anymore.

Tags for this Thread

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.

rssFeed for this Thread

Contact us at files@mathworks.com