I have a database from COVID that I'm playing with. I have info in the format YYYY-MM-DD and I'm plotting days vs. number of cases in a bar plot. In my graph, the days appear as months, but I want an axis with every 7 days. Should I convert my datetime64 format to MM-DD and plot my graph?
This is the code I'm using to plot:
fig, ax = plt.subplots(figsize=(15,7))
ax.bar(x0, y0, color='green')
ax.set(xlabel = 'Data da notificação',
ylabel = 'Casos novos')
plt.setp(ax.get_xticklabels(), rotation = 45)
plt.show()
And this is the resulted graph:
This is the graph I want:
Sample data: https://docs.google.com/spreadsheets/d/1q4Njy0mGMtIeEABdaFrzNEMSavjpXtlUn8BM8z_QZBk/edit?usp=sharing