Hack ipython_directive to optionally require matplotlib