Skip to content

Commit

Permalink
posting picture back to python actually works like a charm with matpl…
Browse files Browse the repository at this point in the history
…otlib redraw
  • Loading branch information
benmaier committed Mar 27, 2019
1 parent 4a83807 commit 90d42dc
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions netwulf/interactive.py
Original file line number Diff line number Diff line change
Expand Up @@ -275,6 +275,14 @@ def visualize(network,
print('changing directory back to', cwd)

os.chdir(cwd)

# see whether or not the whole thing was started from a jupyter notebook and if yes,
# actually re-draw the figure and display it
env = os.environ
program = os.path.basename(env['_'])
if 'jupyter' in program:
fig, ax = wulf.draw_netwulf(posted_network_properties)


return posted_network_properties, posted_config

Expand Down

0 comments on commit 90d42dc

Please sign in to comment.