Customizing visualizations
So far, all of the code we've learned for creating data visualizations has been for making the visualization itself. Now that we have a strong foundation, we are ready to learn how to add reference lines, control colors and textures, and include annotations.
In the 3-customizing_visualizations.ipynb
notebook, let's handle our imports and read in the Facebook stock prices and earthquake datasets:
>>> %matplotlib inline >>> import matplotlib.pyplot as plt >>> import pandas as pd >>> fb = pd.read_csv( ... 'data/fb_stock_prices_2018.csv', ... index_col='date', ... parse_dates=True ... ) >>> quakes = pd.read_csv('data/earthquakes.csv')
Tip
Changing the style in which the plots are created is an easy way to change their look and feel without setting each aspect separately. To set...