I have the below plot, however, I am struggling with the 3 questions below....
- How can I move X-axis labels (1-31) to the top of the plot?
- How can I change formating of the color bar from (7000 to 7k etc.)
- How can I change the color from gray to another cmap like "Reds"?
- Can I change the figure size? plt.figure(figsize=(20,10)) does not work?
data1 = pd.read_csv("a2data/data1.csv")
data2 = pd.read_csv("a2data/data2.csv")
merged_df = pd.concat([data1, data2])
merged_df.set_index(['month', 'day'], inplace=True)
merged_df.sort_index(inplace=True)
merged_df2=merged_df.groupby(['month', 'day']).deaths.mean().unstack('day')
plt.imshow(merged_df2)
plt.xticks(np.arange(merged_df2.shape[1]), merged_df2.columns)
plt.yticks(np.arange(merged_df2.shape[0]), merged_df2.index)
plt.colorbar(orientation="horizontal")
plt.show()


cmap='hot'toimshow? - Quang Hoang