Skip to content

Instantly share code, notes, and snippets.

@naiborhujosua
Created July 26, 2022 03:43
Show Gist options
  • Save naiborhujosua/eae7e4cc5194bf91d710fed1f4bc58ae to your computer and use it in GitHub Desktop.
Save naiborhujosua/eae7e4cc5194bf91d710fed1f4bc58ae to your computer and use it in GitHub Desktop.
Density Plot with Curves
# Draw Plot
plt.figure(figsize=(13,10), dpi= 80)
sns.distplot(data.loc[data['Holiday'] == 'No Holiday', "Rented Bike Count"], color="dodgerblue", label="No Holiday'", hist_kws={'alpha':.7}, kde_kws={'linewidth':3})
sns.distplot(data.loc[data['Holiday'] == 'Holiday', "Rented Bike Count"], color="orange", label="Holiday", hist_kws={'alpha':.7}, kde_kws={'linewidth':3})
plt.ylim(0, 0.004)
# Decoration
plt.title('Density Plot of Rented Bike Count by Holiday', fontsize=22)
plt.legend()
plt.show()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment