Trying to produce a linegraph showing weekly fares by City types (urban, suburban, rural). Getting output as it is in the dataframe by week. I want to change the x axis label to month (Jan-Apr) instead of the dates while showing the output by week. Image below shows desired output. Mine was a bit messy as it was showing by week (based on the weekly data)
DataFrame used (Partial):
date Rural Suburban Urban
2019-01-06 187.92 721.60 1661.68
2019-01-13 67.65 1105.13 2050.43
2019-01-20 306.00 1218.20 1939.02
2019-01-27 179.69 1203.28 2129.51
2019-02-03 333.08 1042.79 2086.94
Below is my code:
#use the graph style fivethirtyeight.
plt.style.use('fivethirtyeight')
plt.plot(weekly_fare_df['Rural'], color='blue')
plt.plot(weekly_fare_df['Suburban'], color='red')
plt.plot(weekly_fare_df['Urban'], color='gold')
plt.show()