[SciPy-User] question on refreshing window

lorenzo agostino lorenzo.agostino at cern.ch
Thu Jan 6 06:23:56 EST 2011


Hello,
I am completely new to scipy and fairly new to python. I am playing around a bit with my code and I encountered a problem
refreshing the name of a window. Essentially I would like to plot two distributions sequentially on the same window, giving a new title to the  window.
The problem is that on the second plot  an extra window pops up (named Figure 1) instead of simply refreshing the first one. Here is the piece of code:

pylab.figure().canvas.set_window_title("Disribution 1")
pylab.hist(incr, 10)  <- first plot in the first window
pylab.show()
                
pylab.figure().canvas.set_window_title("Disribution 2")
pylab.hist(myvec, 10)  <- second plot in the first window
pylab.show()


This is the simple version I tried, I tried many different things with no luck. Any idea?
Thanks!
l.





More information about the SciPy-User mailing list