Skip to content

Commit

Permalink
add flag so user can choose not to plot when posting to python
Browse files Browse the repository at this point in the history
  • Loading branch information
ulfaslak committed Apr 11, 2019
1 parent 2dd26be commit 4647904
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions netwulf/interactive.py
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,8 @@ def log_message(self, format, *args):
def visualize(network,
port=9853,
verbose=False,
config=None):
config=None,
plot_in_cell_below=True):
"""
Visualize a network interactively using Ulf Aslak's d3 web app.
Saves the network as json, saves the passed config and runs
Expand Down Expand Up @@ -301,7 +302,7 @@ def visualize(network,
# apparently this is how it has to be on Windows
is_jupyter = 'JPY_PARENT_PID' in env

if is_jupyter and not is_keyboard_interrupted:
if is_jupyter and plot_in_cell_below and not is_keyboard_interrupted:
fig, ax = wulf.draw_netwulf(posted_network_properties)

return posted_network_properties, posted_config
Expand Down

0 comments on commit 4647904

Please sign in to comment.