I would like to make xtick show all months from November,2019 to February,2021. With the following code, xtick's interval in plot is 2 months.
How should I change it as 1 month interval?
I used mdate to fix it, but the output was just the same.
# create figure and axis objects with subplots()
fig,ax = plt.subplots()
# make a plot
ax.plot(df.Date, df.Close, color="yellow",)
# set x-axis label
ax.set_xlabel("date",fontsize=14)
ax.set_xticklabels(df.Date, Rotation=45)
# set y-axis label
ax.set_ylabel("gold price",color="red",fontsize=14)
# twin object for two different y-axis on the sample plot
ax2=ax.twinx()
# make a plot with different y-axis using second axis object
ax2.plot(us_ncase.date,us_ncase.new_cases ,color="red")
ax2.set_ylabel("Covid New Case",color="blue",fontsize=14)
plt.show()