Formatting plots with matplotlib
A big part of making our visualizations presentable is choosing the right plot type and having them well labeled so they are easy to interpret. By carefully tuning the final appearance of our visualizations, we make them easier to read and understand.
Let's now move to the 2-formatting_plots.ipynb
notebook, run the setup code to import the packages we need, and read in the Facebook stock data and COVID-19 daily new cases data:
>>> %matplotlib inline >>> import matplotlib.pyplot as plt >>> import numpy as np >>> import pandas as pd >>> fb = pd.read_csv( ... 'data/fb_stock_prices_2018.csv', ... index_col='date', ... parse_dates=True ... ) >>> covid = pd.read_csv('data/covid19_cases.csv').assign( ... date=lambda x: \ ... &...