Commit b0a9b8ea authored by Michael Droettboom's avatar Michael Droettboom

Remove output handler -- we have a better, interactive thing now

parent 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
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