I need to display months on x axis of a plot instead of the indexes number of a data frame that goes from 1 to 365, which they represent the number of day of the year. So instead of an x-axis which goes from 1 to 365, I want to display it as "Jan", "Feb" and so on, without losing the structure of the plot.
Here is the main structure of my data frame:
Month Day Max_Data Min_Data MonthDay
1 1 1 1.1 -13.3 1-1
2 1 2 3.9 -12.2 1-2
3 1 3 3.9 -6.7 1-3
4 1 4 4.4 -8.8 1-4
5 1 5 2.8 -15.5 1-5
I am currently plotting using:
plt.scatter(data_2015.index, data_2015['Max_Data'], marker='^', color='green',s=40, alpha=1.0)
And if I changed data_2015.index
to Month
the graph will plot a different a completely wrong values, as they 28, 30 or 31 rows for each month.
So what is the way to convert indexes into month and display them into the x axis of a plot?