Matplotlib 3.0 Cookbook
上QQ阅读APP看书,第一时间看更新

Getting ready

We will use the Wine Quality dataset for this example also. It has 12 different attributes. We will first get a correlation matrix and then plot it as a heatmap. There is no heatmap function/method as such, so we will use the same imshow method that we used to read and display the images.

Import the required libraries:

import matplotlib.pyplot as plt
import pandas as pd