On 07/13/2010 02:05 AM, John Hunter wrote:
I also see buggy behavior, but on my ubuntu linux system I see that
the whole subplot gets painted black on a mouse press and remains so
while the rubber-banding is in effect.  It's not strictly black, but
it looks like blackish bit noise.  I also notice if I don't add the
combobox to the vbox, I have no problem.  But I don't see that the
"plot moves"....

By the plot moves, I mean that with a reasonably sized control on top of the plot the lower x axis seems to shoot upward during the zoom. See the attached example.



It;s somewhat reminiscent of this pixel noise I once reported working
on another gtkagg problem.

Interestingly, I'm seeing the same behavior with backend gtk and gtkagg.

All of which is discouraging: we both see bugs but different ones on
linux,

Actually I think we are seeing the same bug (the blackish noise). I've included screen shots both on the original post and this one so you can see what happens while the mouse is pressed.

the appearance of the bug is caused by adding a combobox which
is not used (on my system), the bug appears on some platforms (linux)
but not others (win) and it appears for both gtk and gtkagg.


I agree with you that it does look like a gtk bug, although it's not ComboBox specific, as the example attached to this message uses a Label.

JLS
from matplotlib.backends.backend_gtkagg import FigureCanvasGTKAgg as FigureCanvas
from matplotlib.backends.backend_gtkagg import NavigationToolbar2GTKAgg as NavigationToolbar

from matplotlib.figure import Figure

import numpy as np
import gtk

N = 1024

class Window:
    def __init__(self):
        self.window = gtk.Window()
        self.window.connect("destroy", lambda x: gtk.main_quit())
        self.window.set_size_request(640,480)

        vbox1 = gtk.VBox()
        self.window.add(vbox1)
        vbox1.pack_start(gtk.Label("LABEL"),False,False)

        vboxPlot = gtk.VBox()

        #Create the lower plot
        self.fig = Figure()
        self.ax = self.fig.add_subplot(111)
        self.canvas = FigureCanvas(self.fig)

        vboxPlot.pack_start(self.canvas)
        self.toolbar = NavigationToolbar(self.canvas, self.window)
        vboxPlot.pack_start(self.toolbar,False,False)
        vboxPlot.show_all()
        self.plot, = self.ax.plot(np.linspace(0.0,1.0,N), np.linspace(0.0,100.0,N),"b",ls='-')


        vbox1.pack_start(vboxPlot)
        self.window.show_all()

win = Window()
gtk.main()

<<attachment: plot_moves2.png>>

------------------------------------------------------------------------------
This SF.net email is sponsored by Sprint
What will you do first with EVO, the first 4G phone?
Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users

Reply via email to