From 5129d70687a38d258ec5c5d19c82870bf6823f31 Mon Sep 17 00:00:00 2001 From: Jody Klymak Date: Mon, 5 Mar 2018 15:52:45 -0800 Subject: [PATCH] Backport PR #10681: Fix tk icon loading. --- lib/matplotlib/backends/_backend_tk.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/matplotlib/backends/_backend_tk.py b/lib/matplotlib/backends/_backend_tk.py index e5ef40caf74f..037322dc8573 100644 --- a/lib/matplotlib/backends/_backend_tk.py +++ b/lib/matplotlib/backends/_backend_tk.py @@ -1052,7 +1052,7 @@ def new_figure_manager_given_figure(cls, num, figure): rcParams['datapath'], 'images', 'matplotlib.ppm') icon_img = Tk.PhotoImage(file=icon_fname) try: - window.tk.call('wm', 'foobar', window._w, icon_img) + window.tk.call('wm', 'iconphoto', window._w, icon_img) except Exception as exc: # log the failure (due e.g. to Tk version), but carry on _log.info('Could not load matplotlib icon: %s', exc)