Fix error on pyplot initialisation in IPython

There was a bug on the pyplot initialisation that was wrongly looking for qApp in
PyQt5.QtGui rather than PyQt5.QtWidgets. I've updated the init to do this
correctly, which hopefully fixes the bug reported by @tacaswell