Created
June 17, 2019 07:59
-
-
Save ken333135/49143a55a2cdc40c991b2a9e1fa6c4f3 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# set colors | |
cmap=['white','red','orange','yellow','green','blue', | |
'indigo','violet','purple','grey','pink', | |
'brown','black'] | |
f, ax = plt.subplots(figsize=(6, 18)) | |
# drop duplicates for bookDf **End of book A is the start of book B | |
df = bookDf.copy() | |
df.drop_duplicates(['Date'],inplace=True) | |
df = df.pivot('Week_num','DOW_num','color_proxy') | |
sns.heatmap(df, linewidths=.5, | |
ax=ax, | |
cmap=cmap, | |
cbar=False, | |
vmin = 0, | |
vmax = 12, | |
square = True, | |
yticklabels = y_ticklabels) | |
ax.set_yticklabels(ax.get_yticklabels(),rotation=0) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment