How it works...

We imported the necessary Matplotlib modules to create a figure and a canvas onto which to draw the chart. We gave it some values for the x and y axes and set a few of the many configuration options.

We created our own tkinter window in which to display the chart, and we customized the positioning of the plots.

As we saw in previous chapters, in order to create a tkinter GUI, we first have to import the tkinter module and then create an instance of the Tk class. We assign this class instance to a variable we name root, which is a name often used in examples that you find online.

Our tkinter GUI will not become visible until we start the main event loop and, to do so, we use root.mainloop().

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.145.166.149