FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

FIX: only expect FigureCanvas on backend module if using new style by tacaswell · Pull Request #23912 · matplotlib/matplotlib · GitHub

Repository navigation

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension .py  (1) All 1 file type selected
Viewed files
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Unified
Split
Hide whitespace
Diff view
Unified
Split
Hide whitespace
3 changes: 2 additions & 1 deletion lib/matplotlib/pyplot.py
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Original file line number Diff line number Diff line change
Expand Up @@ -263,7 +263,6 @@ def switch_backend(newbackend):

backend_mod = importlib.import_module(
cbook._backend_module_name(newbackend))
canvas_class = backend_mod.FigureCanvas

required_framework = _get_required_interactive_framework(backend_mod)
if required_framework is not None:
Expand Down Expand Up @@ -293,6 +292,8 @@ class backend_mod(matplotlib.backend_bases._Backend):
# also update backend_mod accordingly; also, per-backend customization of
# draw_if_interactive is disabled.
if new_figure_manager is None:
# only try to get the canvas class if have opted into the new scheme
canvas_class = backend_mod.FigureCanvas
def new_figure_manager_given_figure(num, figure):
return canvas_class.new_manager(figure, num)

Expand Down

Back | FazBrowse Home | New Git URL