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)