Python Convert indexes starting from 1 to 365 into months names and display them into the x axis without changing the plot structure? 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 &quot;Jan&quot;, &quot;Feb&quot; 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?
You will have to tweak the xaxis locator
e.g. For your sample data -

Month,Day,Max_Data,Min_Data,MonthDay
1,1,1.1,-13.3,1-1
1,2,3.9,-12.2,1-2
1,3,3.9,-6.7,1-3
1,4,4.4,-8.8,1-4
1,52.8,-15.5,1-5

import pandas as pd, numpy as np, seaborn as sns, matplotlib.pyplot as plt

data_2015 = pd.read_csv(&quot;/content/tst.csv&quot;)
plt.scatter(data_2015.index, data_2015['Max_Data'], marker='^', color='green',s=40, alpha=1.0,)

import matplotlib.ticker as mticker
plt.gca().xaxis.set_major_locator(mticker.FixedLocator(np.arange(len(data_2015.index))))
plt.gca().xaxis.set_major_formatter(mticker.FixedFormatter(np.array(['Jan','Feb','Mar','Jan','Feb'])))

Output