Inline plots in ipython under Ubuntu (14.04)

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.

This entry was posted in GNU/linux, software, Ubuntu and tagged , , , . Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s