hey guys i've run into a problem where my plot doesn't show the X axis labels for some reason.
i'm trying to show a visualisation of a line graph but it only shows me this
===================================
Heres my simple code;
import pandas as pd
import matplotlib.pyplot as plt
import matplotlib.dates as mdates
%matplotlib inline
data = pd.read_csv(" MY FILE IN CSV ", usecols=['Month', 'Average'], parse_dates=['Month'])
data.set_index('Month',inplace=True)
fig, ax = plt.subplots(figsize=(10,7))
data.plot(ax=ax)
ax.set_xticks(np.arange(len(x)))
ax.set_xtickslabels(x, rotation = 45)
ax.xaxis.set_major_locator(mdates.WeekdayLocator())
ax.xaxis.set_major_formatter(mdates.DateFormatter('%b %d'))
have i done something wrong?
i based it based on this link here :
https://scentellegher.github.io/programming/2017/05/24/pandas-bar-plot-with-formatted-dates.html