show() doesn't redraw anymore

Posted by Abruzzo Forte e Gentile on Stack Overflow See other posts from Stack Overflow or by Abruzzo Forte e Gentile
Published on 2010-05-07T14:12:12Z Indexed on 2010/05/07 20:28 UTC
Read the original article Hit count: 185

Filed under:
|

Hi All

I am working in linux and I don't know why using python and matplotlib commands draws me only once the chart I want. The first time I call show() the plot is drawn, wihtout any problem, but not the second time and the following.

I close the window showing the chart between the two calls. Do you know why and hot to fix it?

Thanks AFG

from numpy import *
from pylab import *

data = array( [ 1,2,3,4,5] )
plot(data)
[<matplotlib.lines.Line2D object at 0x90c98ac>]
show() # this call shows me a plot

#..now I close the window...

data = array( [ 1,2,3,4,5,6] )
plot(data)
[<matplotlib.lines.Line2D object at 0x92dafec>]
show()  # this one doesn't shows me anything

© Stack Overflow or respective owner

Related posts about python

Related posts about matplotlib