Placing labels on charts
So far, we have used the default Matplotlib GUI. Now we will create some tkinter GUIs using Matplotlib.
This will require a few more lines of Python code and importing some more libraries, and it is well worth the effort, because we are gaining control of our paintings using canvases.
We will position labels onto both the horizontal as well as the vertical axes, aka x and y.
We will do this by creating a Matplotlib figure upon which we will draw.
We will also learn how to use sub plots, which will enable us to draw more than one graph in the same window.
Getting ready
With the necessary Python modules installed and knowing where to find the official online documentation and tutorials, we can now carry on with our creation of ...
Get Python GUI Programming Cookbook now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.