Commit de6fbcc5 authored by Tiago Peixoto's avatar Tiago Peixoto
Browse files

Display inline images in graph_draw() instead of simply returning them

Now, as usual, the position values are returned, instead of the inline
image object.
parent c7d42eca
......@@ -939,7 +939,6 @@ def graph_draw(g, pos=None, vprops=None, eprops=None, vorder=None, eorder=None,
inl_srf.write_to_png(inl_out)
del inl_srf
img = IPython.display.Image(data=inl_out.getvalue())
del srf
if output_file is not None:
if isinstance(output_file, str):
ofile, auto_fmt = open_file(output_file, mode="wb")
......@@ -948,7 +947,7 @@ def graph_draw(g, pos=None, vprops=None, eprops=None, vorder=None, eorder=None,
ofile.write(out.getvalue())
if isinstance(output_file, str):
ofile.close()
return img
IPython.display.display(img)
del srf
return pos
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment