Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit a1f93b5

Browse files
committed
FIX: Webagg save_figure raise a warning instead of an error
1 parent ab549ac commit a1f93b5

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

lib/matplotlib/backends/backend_webagg_core.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
import json
2020
import os
2121
import time
22+
import warnings
2223

2324
import numpy as np
2425

@@ -318,6 +319,10 @@ def release_zoom(self, event):
318319
self.canvas.send_event(
319320
"rubberband", x0=-1, y0=-1, x1=-1, y1=-1)
320321

322+
def save_figure(self, *args):
323+
"""Save the current figure"""
324+
warnings.warn('"Save figure" not implemented in Web Backend')
325+
321326

322327
class FigureManagerWebAgg(backend_bases.FigureManagerBase):
323328
ToolbarCls = NavigationToolbar2WebAgg

0 commit comments

Comments
 (0)