title: use matplotlib with PyQt5 in jupyter notebook
body: <p>I need to create scientific plots with <code>matplotlib</code> in Jupyter notebook, and create them in separate windows instead of inline. I ran <code>%matplotlib qt</code> and got this error: <code>ImportError: No module named PyQt4</code></p>
  
  <p>A lot of related answers on the internet involves installing PyQt4. To give some background information, I use Anaconda to manage python modules on a Windows machine. Anaconda installs PyQt5.6.0 in its root environment by default. Downgrading this package to PyQt4 will solve the problem, however, another module in my project depends on PyQt5. I want to figure out how use matplotlib with PyQt5.</p>
  
  <p>According to matploblib's <a href="https://matplotlib.org/faq/usage_faq.html" rel="nofollow noreferrer">tutorial</a>, it supports PyQt5 backend. I tried to run <code>matplotlib.rcParams['backend'] = "Qt5Agg"</code> and <code>matplotlib.use('Qt5Agg')</code> before the <code>%matplotlib qt</code>, but got same error. Am I missing something that's so obvious to others? Helps are appreciated.</p>