diff --git a/lib/matplotlib/backends/_backend_tk.py b/lib/matplotlib/backends/_backend_tk.py index 267887db908c..d2bcbace5230 100644 --- a/lib/matplotlib/backends/_backend_tk.py +++ b/lib/matplotlib/backends/_backend_tk.py @@ -575,7 +575,7 @@ def _Button(self, text, image_file, toggle, command): # other near checkbuttons # https://bugs.python.org/issue29402 # https://bugs.python.org/issue25684 - var = tk.IntVar() + var = tk.IntVar(master=self) b = tk.Checkbutton( master=self, text=text, image=image, command=command, indicatoron=False, variable=var)