title: matplotlib hangs on mac osx and graph is not displayed
body: <p>I am using Mac Yosemite and Anaconda's distribution for Python 3.4. Whenever I do </p>
  
  <pre><code> import matplotlib.pyplot as plt
   ...
   plt.semilogy(x, y)
   plt.show()
  </code></pre>
  
  <p>an empty window pops up in a hanged up state.</p>
  
  <p>I saw a similar post: <a href="https://stackoverflow.com/search?q=matplotlib%20MAC">Matplotlib not showing up in Mac OSX</a>, which recommended using </p>
  
  <pre><code>sudo port install py25-matplotlib +cairo+gtk2
  sudo port install py26-matplotlib +cairo+gtk2
  </code></pre>
  
  <p>Since I am using python 3.4, I tried</p>
  
  <pre><code>sudo port install py34-matplotlib +cairo+gtk2
  </code></pre>
  
  <p>The installation went fine, but when I tried to <code>import matplotlib</code> on the Python console inside PyCharm, I get the following error:</p>
  
  <pre><code>Backend GTKCairo is interactive backend. Turning interactive mode on.
  Failed to enable GUI event loop integration for 'gtk'
  Traceback (most recent call last):
    File "/Applications/PyCharm CE.app/Contents/helpers/pydev/pydev_console_utils.py", line 498, in do_enable_gui
  enable_gui(guiname)
    File "/Applications/PyCharm CE.app/Contents/helpers/pydev/pydev_ipython/inputhook.py", line 479, in enable_gui
  return gui_hook(app)
    File "/Applications/PyCharm CE.app/Contents/helpers/pydev/pydev_ipython/inputhook.py", line 227, in enable_gtk
  from pydev_ipython.inputhookgtk import create_inputhook_gtk
    File "/Applications/PyCharm CE.app/Contents/helpers/pydev/pydev_import_hook.py", line 21, in do_import
  module = self._system_import(name, *args, **kwargs)
    File "/Applications/PyCharm CE.app/Contents/helpers/pydev/pydev_ipython/inputhookgtk.py", line 19, in &lt;module&gt;
  import gtk, gobject
    File "/Applications/PyCharm CE.app/Contents/helpers/pydev/pydev_import_hook.py", line 21, in do_import
  module = self._system_import(name, *args, **kwargs)
  ImportError: No module named 'gtk'
  </code></pre>
  
  <ol>
  <li><p>What could be the issue?</p></li>
  <li><p>I couldn't locate any <code>gtk</code> module within PyCharm, but i found <code>PyGTK</code>, <code>PyGTKCodeBuffer</code>, <code>PyGTKImageView</code>, etc. Is there any website for the <code>gtk</code> module?</p></li>
  </ol>
  
  <p><strong>* EDIT *</strong></p>
  
  <p>I solved this problem by adding <code>Interactive : True</code> in the <code>matplotlibrc</code> file.</p>