Thread Subject: Updating the axes

Subject: Updating the axes

From: Ian Woloschin

Date: 2 Jun, 2006 15:45:32

Message: 1 of 3

If anyone's been around this past week or two they probably know I've
been working on making a GUI based panning program for use with
Matlab R13. I've got it all working, now I'm trying to make it look
nicer.

When I use WindowButtonMotionFcn, I update the axes whenever the
mouse moves. In my program, this causes for an ugly flashing as the
entire axes are redrawn every time the mouse moves a tiny bit.
Useable, but ugly as...well, you get the point.

Since I started this project I've found a few panning scripts which
I've been able to get some help from, but this I'm stuck on. All of
the panning scripts seem to be fine when panning, no ugly flashing,
and my GUI doesn't do anything more than the scripts for this
function, yet it's flashing constantly.

Is there a way to at least set a "refresh rate" or something like
that?

Subject: Updating the axes

From: Frank Scretico

Date: 2 Jun, 2006 15:53:08

Message: 2 of 3

Try setting the figure property "doublebuffer" to 'on': this should
avoid flashing. (Double buffering works only when the figure
"Renderer" property is set to 'painters'.)
hth,
Frank
 
Ian Woloschin wrote:
>
>
> If anyone's been around this past week or two they probably know
> I've
> been working on making a GUI based panning program for use with
> Matlab R13. I've got it all working, now I'm trying to make it
> look
> nicer.
>
> When I use WindowButtonMotionFcn, I update the axes whenever the
> mouse moves. In my program, this causes for an ugly flashing as
> the
> entire axes are redrawn every time the mouse moves a tiny bit.
> Useable, but ugly as...well, you get the point.
>
> Since I started this project I've found a few panning scripts which
> I've been able to get some help from, but this I'm stuck on. All
> of
> the panning scripts seem to be fine when panning, no ugly flashing,
> and my GUI doesn't do anything more than the scripts for this
> function, yet it's flashing constantly.
>
> Is there a way to at least set a "refresh rate" or something like
> that?

Subject: Updating the axes

From: Ian Woloschin

Date: 2 Jun, 2006 15:59:49

Message: 3 of 3

That did the trick.

I saw a reference to double buffer before, but didn't think about it
because it said it is set to 'on' by default! Apparently this is
wrong...or I'm just very confused.

In anycase, it works now, thanks!

 Frank Scretico wrote:
>
>
> Try setting the figure property "doublebuffer" to 'on': this should
> avoid flashing. (Double buffering works only when the figure
> "Renderer" property is set to 'painters'.)
> hth,
> Frank
>
> Ian Woloschin wrote:
>>
>>
>> If anyone's been around this past week or two they probably
know
>> I've
>> been working on making a GUI based panning program for use with
>> Matlab R13. I've got it all working, now I'm trying to make it
>> look
>> nicer.
>>
>> When I use WindowButtonMotionFcn, I update the axes whenever
the
>> mouse moves. In my program, this causes for an ugly flashing
as
>> the
>> entire axes are redrawn every time the mouse moves a tiny bit.
>> Useable, but ugly as...well, you get the point.
>>
>> Since I started this project I've found a few panning scripts
> which
>> I've been able to get some help from, but this I'm stuck on.
All
>> of
>> the panning scripts seem to be fine when panning, no ugly
> flashing,
>> and my GUI doesn't do anything more than the scripts for this
>> function, yet it's flashing constantly.
>>
>> Is there a way to at least set a "refresh rate" or something
like
>> that?

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