has2k1 / plotnine

A Grammar of Graphics for Python
https://plotnine.org
MIT License
4k stars 213 forks source link

Unrecognised timezone class <class 'datetime.timezone'> #707

Closed jrr96 closed 1 year ago

jrr96 commented 1 year ago

The code below (copy pasted from https://plotnine.readthedocs.io/en/stable/tutorials/miscellaneous-manipulating-date-breaks-and-date-labels.html):

from plotnine.data import economics
(ggplot(economics)
 + geom_point(aes('date', 'psavert'))
 + labs(y='personal saving rate')
)

Produces the error:

Unrecognised timezone class <class 'datetime.timezone'>

has2k1 commented 1 year ago

Make sure you have the latest version of plotnine and mizani==0.9.2.