title: PyCharm doesn’t display plots and is very slow
body: <p>I am trying PyCharm for the first time and have troubles to display my plots. Can you tell me what I missed ? I grouped 2 questions in the same post because I have the feeling it's in fact the same bug, but I'm not sure. I'm using python 3.7 under mac OS 10.11.6 (El Capitan) and don't want to upgrade.</p>
  
  <p>Problem: with the same code, opening a python console in PyCharm and making a basic plot works but is very slow (several seconds for the basic example below, why ?), while running it directly with PyCharm (click on the green triangle) doesn’t show anything: no plot, no message. Why ?</p>
  
  <p>code example :</p>
  
  <pre><code>x = np.arange(10)
  y = np.arange(10)+10
  pg.plot(x,y)
  </code></pre>
  
  <p>In the python console, after several seconds, this gives the expected plot. With the ‘run’ button it gives nothing. Note I copy-paste the ’start-up’ code before the 3 lines above, which is:</p>
  
  <pre><code>import os
  import numpy as np
  os.environ['PYQTGRAPH_QT_LIB'] = 'PyQt5'
  import pyqtgraph as pg
  </code></pre>
  
  <p>The 'run' console just says:</p>
  
  <pre><code>/Users/&lt;username&gt;/anaconda/envs/py37/bin/python /Users/&lt;username&gt;/work/perso/sof/test.py
  Process finished with exit code 0
  </code></pre>
  
  <hr>
  
  <p>update 1:15pm</p>
  
  <p>Following the idea derived from Andrew's comment, I tried the same with matplotlib (which usually is a pain compared to pyqtgraph) and it works:</p>
  
  <pre><code>import numpy as np
  import matplotlib.pyplot as plt
  x = np.arange(10)
  y = np.arange(10)+10
  plt.plot(x,y)
  plt.show()
  </code></pre>
  
  <p>gives the plot, but I would like to use pyqtgraph (added in the tags), and usually the 3 lines above are enough: no need of a 'show' command.</p>
  
  <hr>
  
  <p>update 3:20pm</p>
  
  <p>I also tried the same with a plotWidget but it shows the same problem. The following code:</p>
  
  <pre><code>import numpy as np
  x = np.arange(10)
  y = np.arange(10)+10
  import os
  import pyqtgraph as pg
  os.environ['PYQTGRAPH_QT_LIB'] = 'PyQt5'
  plotWidget = pg.plot(title='test')
  plotWidget.plot(x,y)
  plotWidget.plot(x,2*y)
  plotWidget.plot(x,3*y)
  </code></pre>
  
  <p>gives the expected 3-line-plot when copy-pasted in the python console but nothing happens with the 'run' button or short-cut (same 'run' console).</p>