Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make notebook argument in Network.show default to False #274

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 4 additions & 6 deletions pyvis/network.py
Original file line number Diff line number Diff line change
Expand Up @@ -533,19 +533,17 @@ def write_html(self, name, local=True, notebook=False,open_browser=False):
if open_browser: # open the saved file in a new browser window.
webbrowser.open(getcwd_name)


def show(self, name, local=True,notebook=True):
def show(self, name, local=True, notebook=False):
"""
Writes a static HTML file and saves it locally before opening.

:param: name: the name of the html file to save as
:type name: str
"""
print(name)
if notebook:
self.write_html(name, open_browser=False,notebook=True)
else:
self.write_html(name, open_browser=True)

open_browser = not notebook
self.write_html(name, open_browser=open_browser, notebook=notebook)
if notebook:
return IFrame(name, width=self.width, height=self.height)

Expand Down