Answers for "histogram with frequency curve using seaborn"

2

plot histogram in seaborn

sns.distplot(gapminder['lifeExp'], kde=False, color='red', bins=100)
plt.title('Life Expectancy', fontsize=18)
plt.xlabel('Life Exp (years)', fontsize=16)
plt.ylabel('Frequency', fontsize=16)
Posted by: Guest on May-30-2020
0

how to show mean values on histogram in seaborn

import matplotlib.pyplot as plt
import seaborn as sns

%matplotlib inline

sns.distplot(xgb_errors, kde=True, rug=True);
plt.axvline(np.median(xgb_errors),color='b', linestyle='--')
Posted by: Guest on April-17-2021
0

histogram with frequency curve using seaborn

norm_dist = np.random.randn(100)
sns.histplot(norm_dist, kde = True) # Kde  = True adds frequency curve
plt.show()
Posted by: Guest on February-10-2022

Browse Popular Code Answers by Language