Tkinter is Python’s standard interface to the Tk graphical user-interface toolkit. It can provide the window in which Matplotlib displays a graph across Windows, macOS, and Linux. section 2.5.3
Display a word-frequency graph
Install the plotting dependencies, configure Matplotlib to use Tkinter, and run the script. A small text-analysis program can clean a downloaded novel, count words, and display its 20 most frequent words in a GUI window. section 2.5.3
import matplotlib
import matplotlib.pyplot as plt
matplotlib.use('TkAgg')
Use the Matplotlib backend configuration to select Tkinter for displaying plots. section 2.5.3


