1

When I run a program with PyCharm, it doesn't display graphs made with Matplotlib. E.g.:

import matplotlib.pyplot as plt
[...]
plt.imshow(montage(W / np.max(W)), cmap='coolwarm')

I tried calling

plt.interactive(False)

first, but it didn't make a difference.

Running the same program with ipython3, the graphs are displayed.

1
  • There is a setting someplace deep in the options to select the matplotlib backend to use. Make sure it is set to qt4. Commented Aug 28, 2016 at 18:36

2 Answers 2

1

I set a default back-end for my system in matplotlibrc (TkAgg), and that did the trick.

Sign up to request clarification or add additional context in comments.

Comments

1

The below code worked for me:

in pycharm-community-2018.2.2
import matplotlib.pyplot as plt
df.boxplot(column='ApplicantIncome')
plt.show()

1 Comment

Please add some explanation to your answer so it is better understood!

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.