Skip to content Skip to sidebar Skip to footer

Cannot Set Datetime Ticks When Using Pandas

I am trying to plot some series with pandas. However I have a problem when I try to set major locator on axis with dates. If you want to try on the same dataset as mine, here's the

Solution 1:

In case you want to use the matplotlib.dates locators and formatters on a plot generated by pandas, you need to plot in compatibility mode,

df.plot(..., x_compat=True)

Post a Comment for "Cannot Set Datetime Ticks When Using Pandas"