br@ymir:~/sweethome/temp$ python
Python 2.6.5 (r265:79063, Apr 16 2010, 13:57:41)
[GCC 4.4.3] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import matplotlib.pyplot as plt
>>> plt.ion()
>>> l,=plt.plot([1,2,3],[4,5,6],'bo-') # a figure pops up
>>> l.remove() # nothing happens
>>> plt.draw() # don't forget to redraw
>>>
Но если вы хотите изменить только элемент, вы можете использовать set_ydata(...)
, за которым следует draw()
.