Last active
December 20, 2019 23:41
-
-
Save rayheberer/3a148f1f3998f2754d68918839b040c1 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 seaborn as sns | |
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): | |
sns.distplot(feature, ax=ax, 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