When using ggplot in pyycharm, why am i getting the following error message (see below)?

32 views Asked by At

I am trying to create visuals on Pycharm using ggplot but I receiving the above error message. I used to have no issues running the code and obtaining the visuals in the past. This is the code that I used:

from plotnine import *
from plotnine.data import *

p = (ggplot(diamonds)
     + stat_summary(aes('clarity', 'price', fill='cut'), geom='col', position='dodge')
     + stat_summary(aes('clarity', 'price', color='cut'), geom='linerange', size=1, position=position_dodge(width=0.9))
     + scale_color_hue(l=.3)
     + theme(figure_size=(11, 8))
)

print(p)

I tried the above code but cannot deduce why it's not running:

This is the error:

message:AttributeError: module 'backend_interagg' has no attribute 'FigureCanvas'

0

There are 0 answers