With current matplotlib master, executing %matplotlib notebook fails with an AttributeError: module 'matplotlib.backends' has no attribute 'backend'
Please find a notebook demonstrating this problem here: https://gist.github.com/ericdill/1bfdc12692aec09047bb
#6013 is the PR that broke this.
This is cross posted at ipython/ipython#9286
cc @tacaswell