Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save Sn3akyP3t3/bbb241999b63554d6c45363014991bca to your computer and use it in GitHub Desktop.
Save Sn3akyP3t3/bbb241999b63554d6c45363014991bca to your computer and use it in GitHub Desktop.
import calplot
import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
all_days = pd.date_range('1/1/2019', periods=730, freq='D')
days = np.random.choice(all_days, 500)
events = pd.Series(np.random.randn(len(days)), index=days)
plot = calplot.calplot(events)
# May be useful in some cases, but could also force post image editing to clean up and get proper placement
# plot[0].tight_layout()
plt.show()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment