From b0a9b8ea163a12e965afcc7ee98df9da0e4cb5b0 Mon Sep 17 00:00:00 2001 From: Michael Droettboom Date: Tue, 22 May 2018 11:33:52 -0400 Subject: [PATCH] Remove output handler -- we have a better, interactive thing now --- matplotlib/patches/output_handler.patch | 21 --------------------- 1 file changed, 21 deletions(-) delete mode 100644 matplotlib/patches/output_handler.patch diff --git a/matplotlib/patches/output_handler.patch b/matplotlib/patches/output_handler.patch deleted file mode 100644 index 8428428e5..000000000 --- a/matplotlib/patches/output_handler.patch +++ /dev/null @@ -1,21 +0,0 @@ -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