Pycharm does not show plot from the following code:
import pandas as pd
import numpy as np
import matplotlib as plt
ts = pd.Series(np.random.randn(1000), in
Just add plt.pyplot.show()
, that would be fine.
The best solution is disabling SciView.
I'm using Ubuntu and I tried as @Arie said above but with this line only in terminal:
sudo apt-get install tcl-dev tk-dev python-tk python3-tk
And it worked!
In non-interactive env, we have to use plt.show(block=True)
I had the same problem. Check wether plt.isinteractive()
is True. Setting it to 'False' helped for me.
plt.interactive(False)
import matplotlib
matplotlib.use('TkAgg')
Works for me. (PyCharm/OSX)
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.