trying to plot different sns.kdeplot as subplot by below code but getting the same plot in each sub plots

  python-3.x, seaborn

I am trying to plot different sns.kdeplot as subplot by below code but I am getting the same plot in each sub plots.

dai=[10,15]
fig, axn = plt.subplots(2, 1, sharex=True, sharey=True)
cbar_ax = fig.add_axes([.91, .3, .03, .4])
for j in dai:
    for i, ax in enumerate(axn.flat):
        print(j)
        sns.kdeplot(hour_listm[j], dfm[j].K,ax=ax, cmap="PuBuGn",shade=True, shade_lowest=False,
                cbar=i == 0,
                vmin=0, vmax=0.25,
                cbar_ax=None if i else cbar_ax)  
    ax.set_ylim(0,0.5)
    ax.set_xlim(0,23)
    ax.label_outer()

Any suggestions, please.

Source: Python-3x Questions

LEAVE A COMMENT