I want to use matplotlib as a component of a larger, event-driven GTK app. That means pylab.show is (I think) not the way to go, as it starts up its own event loop which doesn't return. I've tried to clear and plot in my event handler, but my plot is never displayed.
My initialization code looks like this: matplotlib.use("GtkAgg") .... self.figure = matplotlib.figure.Figure() self.plot = self.figure.add_subplot(111) self.plot.set_axisbelow(True) self.figure.tight_layout() My event handler computes a new set of points (about a dozen x/y pairs) and plots them: points = ... generate a list of (x, y) tuples ... print points self.plot.clear() self.plot.plot([x for x, y in points], [y for x, y in points]) Every time my event handler is called, it prints the points (I see them in my xterm), but the plot is never drawn. I looked at this example: http://matplotlib.org/examples/user_interfaces/embedding_in_gtk2.html but it does something with a key press handler that seems very artificial, and not at all like how my application will interact with its environment. Can someone point me to the correct spot in the documentation or some examples that don't require the user to type at the application? Thanks, Skip ------------------------------------------------------------------------------ October Webinars: Code for Performance Free Intel webinars can help you accelerate application performance. Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from the latest Intel processors and coprocessors. See abstracts and register > http://pubads.g.doubleclick.net/gampad/clk?id=60134071&iu=/4140/ostg.clktrk _______________________________________________ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users