Last active
June 16, 2018 18:38
-
-
Save rayheberer/c5826b7be7206a2ca598c44a74c188c8 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import matplotlib.pyplot as plt | |
import numpy as np | |
from sklearn.datasets import load_iris | |
data = load_iris() | |
fig, axes = plt.subplots(nrows=2, ncols=2) | |
fig.subplots_adjust(hspace=0.5) | |
fig.suptitle('Distributions of Iris Features') | |
for ax, feature, name in zip(axes.flatten(), data.data.T, data.feature_names): | |
ax.hist(feature, bins=len(np.unique(data.data.T[0]))//2) | |
ax.set(title=name[:-4].upper(), xlabel='cm') |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment