Python 3.x Matplotlib plot
<p>I am trying to plot a row from a dataframe -</p>

<pre><code>print(df)

Agent ID  Tenure in Month As of 2014         City       State     P201101  \
0   1000000                          65  Jersey City  New Jersey  881.940392   

      P201102      P201103     P201104    P201105    P201106    ...     \
0  166.368261  1261.927008  531.211925  750.33716  357.73649    ...      

       P201306     P201307    P201308     P201309     P201310     P201311  \
0  1041.047706  639.671717  392.27343  860.148349  427.732344  972.562812   

      P201312   
0  593.675603      
</code></pre>

<p>I have sliced the record for Agent Id 1000000 from the dataframe and now i want to plot the monthly sales data (P201101 to P201312) using matplotlib.</p>

<p>Below is my code - </p>

<pre><code>x = list(df.columns[4:40])
y= df.iloc[:,4:40].values.tolist()
plt.plot(y[0])
plt.show()
</code></pre>

<p>Unfortunately, the x-axis shows values 0,5,10.... .I want the x-axis to display P201101, P201102,.....,P201312. I have tried using xlabel, xticks also but that doesnt solve the problem. Please help</p>

<p><a href="https://i.stack.imgur.com/C4E8b.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/C4E8b.png" alt="enter image description here"></a></p>