So I am trying to set up a chart in python to show the development of an inter-month spread over the year (i.e. Oct/Nov 2015, Oct/Nov 2016, and so on).
Currently when I plot, it shows me the whole timeline on the x-axis from 2015 to however far I go.
Preferably I would like to show number of days rather than actual date on X-axis, since they are all over a year.
I've tried the following code:
#Fetching curve
curve_name = 'Oct/Nov'
OctNov = get_forward_curve_history(name=curve_name, start_date='2019-01-
01', end_date=date)
#plotting spread
Oct/Nov = Med4.loc['2019-10-01':'2019-10-31'].mean() - JKM5.loc['2019-11-
01':'2019-11-30'].mean()
Oct/Nov.plot()
#legend and grid commands
plt.gca().legend(('Oct/Nov17','Oct/Nov18','Oct/Nov19'))
plt.grid()
plt.show()
I would expecting something like the below, where we can see different years but on the same X-axis scale (roughly 365 days):