zoom rectangles and redraw

Actually, it took us quite a while to find out in which

    > situation the problem occurs. How often it happens does
    > depend on the way the user interacts with the mouse, but:
    > Any tiny movement of the mouse while releasing the left
    > mouse button will have the same effect.

I encountered this bug recently too. It appeared in the GTK* backend
where the button release event appeared to be ignored. Were you
running on GTK*?

JDH

Yes - I just checked to be sure: GTKAgg (sorry for not mentioniong this).
The problem is only there for GTK*.

Some remarks: I used the following script

···

On Tue, 8 Nov 2005, John Hunter wrote:

    > Actually, it took us quite a while to find out in which
    > situation the problem occurs. How often it happens does
    > depend on the way the user interacts with the mouse, but:
    > Any tiny movement of the mouse while releasing the left
    > mouse button will have the same effect.

I encountered this bug recently too. It appeared in the GTK* backend
where the button release event appeared to be ignored. Were you
running on GTK*?

##############################################
"""
python tst.py -dGTKAgg
python tst.py -dTkAgg
"""

from pylab import *
figure(figsize=(4,4))
x=arange(0.0,10.,0.1)
plot(x,x**2)
show()
##################################################

- leaving the whole figure window (and entering another window)
  leads to a redraw (this might be pretty window manager specific ...)
- Somehow I thought that this is related to
################################################
""" Little sample of how the buffering doesn't work in the cvs-version.
    There is no problem in 0.82!"""

from pylab import *

ion() # interactive mode
x = arange(10)
plot(x,x*x)
draw()
raw_input("During this time the plot is not refreshed when \
temporarily overlapped by another window.")
#show()
################################################

The buffering does work with TkAgg, but not with GTK*,
and also not with WX*, so it might be not related.
Do you have any idea what has changed since 0.82
so that the buffering does not work anymore?

- for TkAgg one gets a pretty unpleasent "breathing"
  of the plot window because the string for the mouse coords
  changes its length
  (it gets even worse when switching to zoom to rectangle mode).
  A solution might be to generate a string
  representation of the coordinates
  for which the number of digits is constant.

Best, Arnd