1

I have a problem visualizing plots in pycharm, and I haven't found a solution yet. Does anyone know how to view plots in PyCharm?

import matplotlib.pyplot as plt
plt.style.use('ggplot')
df['Score'].value_counts().sort_index().plot(
    kind='bar',
    title='Count of Reviews by Stars',
    figsize=(10, 5)
)
tdy
  • 36,675
  • 19
  • 86
  • 83

2 Answers2

1

Can you add plt.show() at the end of your script?

import matplotlib.pyplot as plt
plt.style.use('ggplot')
df['Score'].value_counts().sort_index().plot(kind='bar', title='Count of Reviews by Stars',
                                                      figsize=(10, 5))
plt.show()
0

Try putting this at the top of your script:

import matplotlib
matplotlib.use('TkAgg')
import matplotlib.pyplot as plt