From: John H. <jd...@gm...> - 2008-05-20 13:15:41
|
> My problem is: even though I call draw() twice, the figure is not > imeediately updated when the user selects a given line on the treeview. The > figure is updated only when I change the size of a pane. I tried using > matplotlib in interactive mode, adding the line > > matplotlib.interactive( True ) You don't need this - -this is for people working interactively from the python shell, not using mpl in a GUI. > > after the lines > > import matplotlib > matplotlib.use( 'GTK' ) This is fine, but also not necessary. This affects people using pylab/pyplot. You should not be. You should be following the "embedding_in_YOURGUI*.py examples at http://matplotlib.sf.net/examples > barraAtual.draw( ) If I read your post correctly, barraActual is a Rectangle. You need to be calling draw on the FigureCanvas, not on the individual artists. Eg fig.canvas.draw where fig is your matplotlib.figure.Figure instance. JDH |