В ноутбуке Jupyter matplolib не удается сохранить фигуру. MVE:
from matplotlib import pyplot as plt
%matplotlib notebook
fig, ax = plt.subplots()
fig.savefig("1.png")
Производит:
AttributeError Traceback (most recent call last)
/usr/lib/python3.8/site-packages/matplotlib/backend_bases.py in _wait_cursor_for_draw_cm(self)
2772 try:
-> 2773 self.set_cursor(cursors.WAIT)
2774 yield
/usr/lib/python3.8/site-packages/matplotlib/backends/backend_webagg_core.py in set_cursor(self, cursor)
380 if cursor != self.cursor:
--> 381 self.canvas.send_event("cursor", cursor=cursor)
382 self.cursor = cursor
/usr/lib/python3.8/site-packages/matplotlib/backends/backend_webagg_core.py in send_event(self, event_type, **kwargs)
345 def send_event(self, event_type, **kwargs):
--> 346 self.manager._send_event(event_type, **kwargs)
347
AttributeError: 'NoneType' object has no attribute '_send_event'
Пока все отлично работает в неинтерактивных %matplotlib inline
. Matplotlib: 3.2.0, i python: 7.13.0. Есть идеи как это исправить?
Спасибо