Skip to content

Instantly share code, notes, and snippets.

@WalkerHarrison
Created March 9, 2017 15:40
Show Gist options
  • Save WalkerHarrison/3b1a21b5ee0597fe274b5d9a264cdee0 to your computer and use it in GitHub Desktop.
Save WalkerHarrison/3b1a21b5ee0597fe274b5d9a264cdee0 to your computer and use it in GitHub Desktop.
hours = [datetime.datetime.strptime(i, '%Y-%m-%d %H:%M:%S').hour for i in dates]
n, bins, patches = plt.hist(hours, 24, facecolor='blue', alpha=0.75)
plt.xticks([0,6,12,18], ['12 AM','6 AM', '12 PM', '6 PM'], fontsize=18)
plt.xlabel('Hour', fontsize=24)
plt.ylabel('Frequency', fontsize=24)
plt.gcf().set_size_inches(18.5, 10.5, forward=True)
plt.show()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment