pythonmatplotlibplotnine

No module named 'matplotlib.typing'


I am receiving an error message: ModuleNotFoundError: No module named 'matplotlib.typing' with this bit of code:

from plotnine import *

(ggplot(the, aes(x='Trial', y='Weights', colour='Cues')) +
    geom_line() +
    scale_colour_manual(values=['#1f78b4','#b2df8a','#fb9a99','#e31a1c','#ae017e']))

I am running Anaconda on macOS:

This, however, works on my older machine with all the same specs but plotnine being 0.12.4.

Can you please help? Thanks!


Solution

  • The plotnine needs to be downgraded:

    pip install plotnine==0.12.4