Seaborn histogram with 4 panels (2 x 2) in Python
<p>I'm trying to recreate this image using <code>sklearn.datasets.load_iris</code> and <code>seaborn</code>.  I really like the idea of doing <code>fig, ax = plt.subplots()</code> and then using <code>seaborn</code>'s <code>ax=ax</code> attribute.  I can't figure out how to recreate this plot: <a href="https://i.stack.imgur.com/klC2n.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/klC2n.png" alt="enter image description here"></a></p>

<p>I checked on stackoverflow and found this but it overlays them <a href="https://stackoverflow.com/questions/36362624/how-to-plot-multiple-histograms-on-same-plot-with-seaborn">How To Plot Multiple Histograms On Same Plot With Seaborn</a></p>

<p>Here's my code and plot:</p>

<pre><code># Iris Dataset
from sklearn.datasets import load_iris
import matplotlib.pyplot as plt
import seaborn as sns; sns.set()

%matplotlib inline 

DF_data = pd.DataFrame(load_iris().data, 
                       columns = load_iris().feature_names, 
                       index = ["iris_%d" % i for i in range(load_iris().data.shape[0])])

Se_targets = pd.Series(load_iris().target, 
                       index = ["iris_%d" % i for i in range(load_iris().data.shape[0])], 
                       name = "Targets")

#Visualizing Iris Data
D_targets = {0: 'Iris-Setosa',
            1: 'Iris-Versicolor',
            2: 'Iris-Virgnica'}

D_features = {0: 'sepal length [cm]',
              1: 'sepal width [cm]',
              2: 'petal length [cm]',
              3: 'petal width [cm]'}

fig, ax = plt.subplots(nrows=2, ncols=2, figsize=(8, 6))

idx_feature = 0

#Plot on 2 x 2 ax object

for i in range(ax.shape[0]):
    for j in range(0, ax.shape[1]):
        for idx_target, label_target  in list(D_targets.items()):
            sns.distplot(DF_data.as_matrix()[Se_targets==idx_target, idx_feature],
                         label=D_features[idx_feature],
                         kde=False,
                         bins=10,
                         ax=ax[i][j])        
        idx_feature += 1 

plt.legend(loc='upper right', fancybox=True, fontsize=8)

plt.tight_layout()
plt.show()
</code></pre>

<p>My plot is looking pretty bad:</p>

<p><a href="https://i.stack.imgur.com/dxeid.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/dxeid.png" alt="enter image description here"></a></p>

<p><strong>UPDATE:</strong> </p>

<p>In response to @Cel answer, I've achieved this plot but I haven't been able to fix the labels and darken the lines around the plots. </p>

<p><a href="https://i.stack.imgur.com/ypye8.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/ypye8.png" alt="enter image description here"></a></p>