Skip to content

Instantly share code, notes, and snippets.

@GeorgeSeif
Created March 1, 2018 16:49
Show Gist options
  • Save GeorgeSeif/15f2c3e21c6921edfaf936eb94826401 to your computer and use it in GitHub Desktop.
Save GeorgeSeif/15f2c3e21c6921edfaf936eb94826401 to your computer and use it in GitHub Desktop.
def histogram(data, n_bins, cumulative=False, x_label = "", y_label = "", title = ""):
_, ax = plt.subplots()
ax.hist(data, n_bins = n_bins, cumulative = cumulative, color = '#539caf')
ax.set_ylabel(y_label)
ax.set_xlabel(x_label)
ax.set_title(title)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment