I am trying to plot some data against a list of datetime
objects in the x axis with pyplot. However the dates appear as the standard format, which is %Y-%m-%d %H:%M:%S
(way too long). I can circumvent this by creating a list of date strings with strftime
and use that instead. I also know that there is some kind of date
object intrinsic for pyplot
which I could use instead of datetime
.
Is there a way to tell pyplot
in which format to plot the datetime
objects however? Without having to transform everything to string or another kind of object?
Thank you.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…