title: %matplotlib inline doesn't work on iPython and Jupyter console
body: <p>I'm trying out Jupyter console for the first time, but can't get the <code>%matplotlib inline</code> magic to work. Below is a screenshot of an example session:</p>
  
  <p><a href="https://i.stack.imgur.com/G0g5k.png" rel="noreferrer"><img src="https://i.stack.imgur.com/G0g5k.png" alt="The window is a result of Line 6, and Line 7 didn&#39;t do anything at all."></a>
  The plot shows in a separate window after I run Line 6, and Line 7 doesn't do anything.</p>
  
  <p>When I run <code>%matplotlib --list</code>, <code>inline</code> is given as one of the options: </p>
  
  <pre><code>Available matplotlib backends: ['osx', 'qt4', 'qt5', 'gtk3', 'notebook', 'wx', 'qt',
  'nbagg', 'agg', 'gtk', 'tk', 'ipympl', 'inline']
  </code></pre>
  
  <p>When I try to use another backend, say <code>qt5</code>, it gives an error message because I don't have any Qt installed.</p>
  
  <pre><code>ImportError: Matplotlib qt-based backends require an external PyQt4, PyQt5, or PySide
  package to be installed, but it was not found.
  </code></pre>
  
  <p>Running <code>%matplotlib??</code> reads:</p>
  
  <pre><code> If you are using the inline matplotlib backend in the IPython Notebook
          you can set which figure formats are enabled using the following::
  
              In [1]: from IPython.display import set_matplotlib_formats
  
              In [2]: set_matplotlib_formats('pdf', 'svg')
  
          The default for inline figures sets `bbox_inches` to 'tight'. This can
          cause discrepancies between the displayed image and the identical
          image created using `savefig`. This behavior can be disabled using the
          `%config` magic::
  
              In [3]: %config InlineBackend.print_figure_kwargs = {'bbox_inches':None}
  </code></pre>
  
  <p>But I don't know if it's something I can tweak around to solve my issue.</p>
  
  <p>When I try it the magic IPython console, it says <code>inline</code> is an <code>Unknown Backend</code>.</p>
  
  <pre><code>UnknownBackend: No event loop integration for u'inline'. Supported event loops are: qt, 
  qt4, qt5, gtk, gtk2, gtk3, tk, wx, pyglet, glut, osx
  </code></pre>
  
  <p>I've also found <a href="https://github.com/jupyter/nbconvert/issues/503" rel="noreferrer">this issue on github</a> after some googling but I don't even know if it's relevant to my situation (most of their conversation didn't make sense to me lol).</p>
  
  <p>Lastly, I'm not sure if this issue is related at all, but here it is, just in case: when I try to open Vim in Jupyter via the <code>!vim</code> command, it glitches pretty badly, preventing me from even exiting out of Jupyter itself without closing the terminal altogther. Vim works perfectly fine when called inside IPython console, however.</p>
  
  <p>I'm using <code>matplotlib 2.0.0</code>.</p>
  
  <p>If anyone could help me figure this out, that'd be great! Thank you!</p>