Pycharm does not show plot
--
Track title: CC B Schuberts Piano Sonata No 16 D
--
Chapters
00:00 Question
01:16 Accepted answer (Score 179)
01:36 Answer 2 (Score 69)
02:24 Answer 3 (Score 37)
02:51 Answer 4 (Score 35)
03:09 Thank you
--
Full question
https://stackoverflow.com/questions/2488...
--
Content licensed under CC BY-SA
https://meta.stackexchange.com/help/lice...
--
Tags
#python #matplotlib #pycharm
#avk47
ANSWER 1
Score 69
I realize this is old but I figured I'd clear up a misconception for other travelers. Setting plt.pyplot.isinteractive() to False means that the plot will on be drawn on specific commands to draw (i.e. plt.pyplot.show()). Setting plt.pyplot.isinteractive() to True means that every pyplot (plt) command will trigger a draw command (i.e. plt.pyplot.show()). So what you were more than likely looking for is plt.pyplot.show() at the end of your program to display the graph.
As a side note you can shorten these statements a bit by using the following import command import matplotlib.pyplot as plt rather than matplotlib as plt.
ANSWER 2
Score 39
I tried different solutions but what finally worked for me was plt.show(block=True). You need to add this command after the myDataFrame.plot() command for this to take effect. If you have multiple plot just add the command at the end of your code. It will allow you to see every data you are plotting.
ANSWER 3
Score 39
import matplotlib
matplotlib.use('TkAgg')
Works for me. (PyCharm/OSX)
ANSWER 4
Score 38
I had the same problem. Check wether plt.isinteractive() is True. Setting it to 'False' helped for me.
plt.interactive(False)