This may be my shortest blog post ever, but I’ve been wondering (even with Google’s help) for years why I cannot get my matplotlib graphics to display inline in ipython. This is not always desirable, since they’re not editable/zoomable like they are as pop-up windows, but it is often very nice.
It seems that all I needed was to install one more package, “pysides”. Strange. In any case, with:
sudo apt-get install ipython-qtconsole pysides
does the trick. For convenience I put the following alias in my .bashrc file
alias pyqt='ipython qtconsole --pylab=inline &'
and then running pyqt gets me all I want. Using “show()” from the pylab package makes plots appear in the flow of commands and output, as follows:
You may also like the ipython-notebook package for making web-ready python demonstrations.