I have a 1D array of date ordinals extracted from the datetime module. This array holds the ordinals as floats.
I plotted a figure by using matplotlib pyplot as such:
import numpy as np
from datetime import datetime as dt
from matplotlib import pyplot as plt
f = plt.plot(newdates, surge)
The newdates and surge 1D arrays are of the same size. What I want to know if how to setup the dateticks as dates instead of the date ordinals. For example newdates[0] = array([710397.]) So in my figure, the first tick will be 710397, but I want the date as %m%Y
format instead. Is there a way to do this directly? I attach my figure for reference.