Error when zooming manually with the mouse outside of the axes

With the Mac OS X backend (at least…), error messages are repeatedly printed
when the mouse leaves the axes rectangle:

Traceback (most recent call last):
  File
"/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/matplotlib/backend_bases.py",
line 1625, in motion_notify_event
    self.callbacks.process(s, event)
  File
"/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/matplotlib/cbook.py",
line 265, in process
    proxy(*args, **kwargs)
  File
"/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/matplotlib/cbook.py",
line 191, in __call__
    return mtd(*args, **kwargs)
  File
"/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/matplotlib/backend_bases.py",
line 2573, in drag_zoom
    self.draw_rubberband(event, x, y, lastx, lasty)
  File
"/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/matplotlib/backends/backend_macosx.py",
line 420, in draw_rubberband
    self.canvas.set_rubberband(x0, y0, x1, y1)
TypeError: integer argument expected, got float

This problem is annoying because the error messages clutter the terminal,
and useful printed information leaves the screen. :slight_smile:

Configuration: Mac OS X 10.7, latest MacPort's Python and modules,
Matplotlib 1.0.1 with Mac OS X backend.

···

--
View this message in context: http://old.nabble.com/Error-when-zooming-manually-with-the-mouse-outside-of-the-axes-tp32503759p32503759.html
Sent from the matplotlib - users mailing list archive at Nabble.com.

Hi Eric,

···

On Wed, Sep 21, 2011 at 9:11 AM, Eric O LEBIGOT (EOL) <Eric.Lebigot@...1818...> wrote:

With the Mac OS X backend (at least…), error messages are repeatedly printed
when the mouse leaves the axes rectangle:

File
"/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/matplotlib/backends/backend_macosx.py",
line 420, in draw_rubberband
self.canvas.set_rubberband(x0, y0, x1, y1)
TypeError: integer argument expected, got float

This problem is annoying because the error messages clutter the terminal,
and useful printed information leaves the screen. :slight_smile:

This problem was fixed by 2c924046 (Jim Radford 2011-03-08 15:07:23 -0800 459)
and now reads:

    self.canvas.set_rubberband(int(x0), int(y0), int(x1), int(y1))

Please update either that line alone, or checkout the latest
matplotlib sources from GitHub.

best,
--
Paul Ivanov
314 address only used for lists, off-list direct email at:
http://pirsquared.org | GPG/PGP key id: 0x0F3E28F7

Paul Ivanov wrote:

Hi Eric,

This problem was fixed by 2c924046 (Jim Radford 2011-03-08 15:07:23 -0800
459)
and now reads:

    self.canvas.set_rubberband(int(x0), int(y0), int(x1), int(y1))

Please update either that line alone, or checkout the latest
matplotlib sources from GitHub.

best,
--
Paul Ivanov

Great! thanks.

···

--
View this message in context: http://old.nabble.com/Error-when-zooming-manually-with-the-mouse-outside-of-the-axes-tp32503759p32531767.html
Sent from the matplotlib - users mailing list archive at Nabble.com.