Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
P
pyodide
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Boxiang Sun
pyodide
Commits
bd4621ca
Commit
bd4621ca
authored
Jun 01, 2018
by
Michael Droettboom
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix #46: Automatically update plots in matplotlib
parent
c3df5188
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
2 deletions
+5
-2
src/wasm_backend.py
src/wasm_backend.py
+5
-2
No files found.
src/wasm_backend.py
View file @
bd4621ca
...
...
@@ -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'
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment