igraph/igraph — pull request #7 by JanSchulz (2013-04-18 19:24:28+00:00)
Title: Show plots inline in IPython

IPython can show plots inline and this ads this functionality to
igraph.

This does means, that if igraph runs in IPython, just calling
plot(graph) will NOT open a new window unless inline=False. If
IPython is not present the old behaviour should happen.

The "magic" works via the new _repr_svg_ method: if a returned
object has such a method, the result of this method will be
displayed as a svg image.

This could also be done as a display formatter plugin for IPython
(like here:
http://pig-in-the-python.blogspot.de/2012/09/using-ipython-notebook-and-reprsvg-with.html )
but this would mean that the plot is both shown in a additional
window and in IPython. So a test for IPython is needed even for in
that case :-(

Closes LP:#1132669
https://bugs.launchpad.net/igraph/+bug/1132669