I`m want to replace the deprecated sns.distplot with the "new" sns.histplot for the viszualization of a prediction vs measured - quality target with two overlapping histograms. "old way"
x1 = y_predict
y1 = y_test_asarray
figure(figsize=(10,10))
plt.ylabel('Probability')
plt.xlabel('Air perm.')
plt.title('Air perm. measured vs. predicted')
sns.distplot(x1 , 60, color='red', label='pred')
sns.distplot(y1 , 60, color='Blue', label='measured')
plt.legend()
showing this:
changing the code to the sns.histplot works, but the color argument isnt executed. I
m not able to get the color-coding working, so both histogramms are the same color. Any recomendations to get the recoloring working?
x1 = y_predict
y1 = y_test_asarray
figure(figsize=(10,10))
plt.ylabel('Probability')
plt.xlabel('Air perm.')
plt.style.use('seaborn-whitegrid')
plt.title('Air perm. measured vs. predicted')
sns.histplot(x1 , bins=60, color='red', kde=True, label='pred')
sns.histplot(y1 , bins=60, color='Blue', kde=True, label='measured')
plt.legend()