1import pandas as pd
2import matplotlib.pyplot as plt
3%matplotlib inline
4
5from sklearn import datasets
6
7iris_dataset = datasets.load_iris()
8X = iris_dataset.data
9Y = iris_dataset.target
10
11iris_dataframe = pd.DataFrame(X, columns=iris_dataset.feature_names)
12
13# Create a scatter matrix from the dataframe, color by y_train
14grr = pd.plotting.scatter_matrix(iris_dataframe, c=Y, figsize=(15, 15), marker='o',
15 hist_kwds={'bins': 20}, s=60, alpha=.8)
16