wxmpl

Animating Matplotlib panel - blit leaves old frames behind

烈酒焚心 提交于 2019-12-31 01:53:26
问题 I have a wxPython application which contains a matplotlib panel (courtesy of wxmpl, though I've seen the same with a plain FigureCanvasWxAgg canvas). I'd want to animate one of the plots in the panel, and in the past I've made similar things happen. The way I'm doing it is the suggested: copy the background plot [...] restore background update line data draw artist blit The problem is that the plots, instead of being "overwritten" by the background restoring, stay there and the whole things

Error when updating wxmplot graph

偶尔善良 提交于 2019-12-13 20:12:22
问题 I am trying to create a graph that updates dynamically using wxmplot in Python 3.6. According to the documentation here: http://cars.uchicago.edu/software/python/wxmplot/plotpanel.html#plotpanel.plot, I should be calling the update_line function which allows for faster graph updates compared to redrawing the plot. However, this function is not working for me. Here is my code: import wx import random from wxmplot import PlotPanel class MainFrame(wx.Frame): def __init__(self, parent): wx.Frame.