Commit bd4621ca authored by Michael Droettboom's avatar Michael Droettboom

Fix #46: Automatically update plots in matplotlib

parent c3df5188
......@@ -18,13 +18,16 @@ import math
from matplotlib.backends import backend_agg
from matplotlib.backend_bases import _Backend
from matplotlib import backend_bases, _png
from matplotlib import backend_bases, interactive, _png
from js import document
from js import window
from js import ImageData
interactive(True)
class FigureCanvasWasm(backend_agg.FigureCanvasAgg):
supports_blit = False
......@@ -178,7 +181,7 @@ class FigureCanvasWasm(backend_agg.FigureCanvasAgg):
def draw_idle(self):
if not self._idle_scheduled:
self._idle_scheduled = True
window.setTimeout(self.draw, 0)
window.setTimeout(self.draw, 1)
def set_message(self, message):
message_display = self.get_element('message')
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment