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='--')