Tkinter-based backend 

Let's try to copy the following code to a separate text file and name it chapter6_gui.py. After that, type python chapter6_gui.py in your terminal (Mac/Linux) or Command Prompt (Windows). If you are unsure about how to open a terminal or Command Prompt, refer to Chapter 1, Hello Plotting World!, for more details:

import matplotlibimport matplotlib.pyplot as pltimport textwrap # Standard library for text wrapingimport requestsimport pandas as pdfrom bs4 import BeautifulSoup# Specify the urlurl = "https://www.bls.gov/emp/ep_table_001.htm"# Query the website and get the html responseresponse = requests.get(url)# Parse the returned html using BeautifulSoupbs = BeautifulSoup(response.text)# Select the table header by CSS ...

Get Matplotlib 2.x By Example now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.