[graph-tool] inline and output

Tiago de Paula Peixoto tiago at skewed.de
Fri Mar 21 16:08:20 CET 2014


On 03/21/2014 03:37 PM, Pietro Battiston wrote:
> There was only a small problem for my typical workflow: I usually
> produce figures in pdf, which however raises an error if I set
> "inline=True", because it cannot be embedded in the webpage.
>
> I solved this with a patch, that you may want to accept:
> https://github.com/count0/graph-tool/pull/5

It is merged. Thanks!

> Another minor annoyance that I found with the inline ability is that it
> is different from matplotlib and networkx in the fact that it must be
> run as last.
>
> That is, if you run a cell with the following content:
>
> import networkx
> g = networkx.random_graphs.complete_graph(5)
> networkx.draw(g)
> print "ciao"
>
> ... in the output you see both "ciao" and the network. If instead you
> try
>
> from graph_tool.all import *
> g = complete_graph(5)
> graph_draw(g, inline=True)
> print("ciao")
>
> ... in the output you will only see "ciao".
>
> I'm not expert in IPython internals, but I guess it should be simple to
> solve.

Yes, the image should be simply displayed instead of returned. I have
fixed this now in git.

Best,
Tiago


-- 
Tiago de Paula Peixoto <tiago at skewed.de>

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 901 bytes
Desc: OpenPGP digital signature
URL: <https://lists.skewed.de/pipermail/graph-tool/attachments/20140321/a28f219f/attachment.asc>


More information about the graph-tool mailing list