Terry J. Reedy added the comment:
You neglected to state the observation that led to the conclusion of 'not
linked'. Using 3.8 on Win10, I replaced "plt.set_cmap('x')" with "tk.Tk()".
Then, clicking the button prints 'False' even when the checkbutton is checked.
After either removing
New submission from Amir Emami :
TkInter variable classes don't link to a widget (tested on Checkbutton and
Scale) if matplotlib.pyplot.set_cmap() function is called before the
tkinter.Tk() call which instantiates the root of a TkInter GUI. There is no
problem if it is called after this,