histograms in seaborn code example
Example 1: 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)
Example 2: 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='--')