I am trying to plot forecast values in a line chart. The x-ticks are supposed to be the month and year (e.g April 2016). The problem is my plot is not ordered correctly and I cannot see the actual x-tick values.
This is the code I have
ax_forecast= forecasted.groupby('Month_Year')['yhat'].sum().plot(figsize=(18,10))
ax_forecast.get_yaxis().get_major_formatter().set_scientific(False)
This is the data I am trying to plot:
forecasted = {'yhat': {'April-2016': 43929615.41783013,
'April-2017': 185274599.56791607,
'August-2016': 60087106.8660238,
'August-2017': 261765749.04794392,
'December-2016': 124431182.12443578,
'December-2017': 332058061.2991861,
'February-2016': 34433800.70402009,
'February-2017': 142399676.4087281,
'January-2016': 34457502.66028841,
'January-2017': 137696430.5545896,
'July-2016': 54386802.22264939,
'July-2017': 240745719.65645707,
'June-2016': 47449151.90045062,
'June-2017': 222406328.28095606,
'March-2016': 42585010.655475326,
'March-2017': 177069816.0218604,
'May-2016': 46727385.96441124,
'May-2017': 206100279.7210855,
'November-2016': 102356396.73384078,
'November-2017': 304690514.1417595,
'October-2016': 88107961.21290714,
'October-2017': 288239985.2960009,
'September-2016': 70276527.38316415,
'September-2017': 274392518.4590202}}