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
b0a9b8ea
Commit
b0a9b8ea
authored
May 22, 2018
by
Michael Droettboom
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove output handler -- we have a better, interactive thing now
parent
5f8bd963
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
0 additions
and
21 deletions
+0
-21
matplotlib/patches/output_handler.patch
matplotlib/patches/output_handler.patch
+0
-21
No files found.
matplotlib/patches/output_handler.patch
deleted
100644 → 0
View file @
5f8bd963
diff -ur matplotlib-2.2.2/lib/matplotlib/figure.py matplotlib-2.2.2/lib/matplotlib/figure.py
--- a/lib/matplotlib/figure.py 2018-03-05 23:47:09.000000000 -0500
+++ b/lib/matplotlib/figure.py 2018-05-17 10:46:52.355306452 -0400
@@ -420,6 +420,17 @@
from matplotlib.backends import backend_webagg
return backend_webagg.ipython_inline_display(self)
+ def _repr_html_(self):
+ from js import document
+ import io
+ import base64
+ png_data = io.BytesIO()
+ self.savefig(png_data, format='png')
+ img = document.createElement('img')
+ img.src = 'data:image/png;base64,' + \
+ base64.b64encode(png_data.getvalue()).decode('ascii')
+ return img
+
def show(self, warn=True):
"""
If using a GUI backend with pyplot, display the figure window.
\ No newline at end of file
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