You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Calling `FigureCanvasPdf(figure)` will call `figure.set_canvas(self)`,
meaning the `cbook._setattr_cm` context manager that wraps this change
will see the _new_ canvas, and the old canvas isn't restored.
Instead, just pass the `backend` parameter, as `savefig` already knows
how to correctly save and restore the canvas if it needs to change
backends.
Fixesmatplotlib#27865
0 commit comments