Hi I am trying to change the x-axis into a month axis but cant seem to do it.
I can't find a way to insert the datetime axis, and when I do I run into errors.
This is my datetime variables, basically its simple, just want to create a weekly counter that starts on 2020 for 1 year:
date = pd.date_range(start='2020-01-01', periods=52, freq='w')
This is my plot code:
cumm19=fcst2019.cumsum()
cumm20=fcst2020.cumsum()
cumm20w=fcst2020w.cumsum()
plt.axhline(y=cumm19['no._of_cases'][51], color='r', label= '2019 numbers (15,910)')
plt.plot(cumm20[:21], label ='2020 current')
plt.plot(cumm20[20:], label ='2020 predictions')
plt.plot(cumm20w[20:], label ='2020 worse case predictions')
plt.xlabel('Months')
plt.ylabel('Cumulative no. of cases')
plt.legend()
plt.show()
How do i combine them?