From 32479552521a3f63d3107b07fd3eb39834afb424 Mon Sep 17 00:00:00 2001 From: yuvalorp <66062277+yuvalorp@users.noreply.github.com> Date: Thu, 26 Oct 2023 11:43:54 +0300 Subject: [PATCH] fix problem when running the example on computer when running the examples of the tutorial outside of jupyter you need to pass notebook=False which wasnt explained before --- pyvis/source/tutorial.rst | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/pyvis/source/tutorial.rst b/pyvis/source/tutorial.rst index 9178baf..774caf0 100644 --- a/pyvis/source/tutorial.rst +++ b/pyvis/source/tutorial.rst @@ -147,10 +147,8 @@ The displaying of a graph is achieved by a single method call on :meth:`network.Network.show()` after the underlying network is constructed. The interactive visualization is presented as a static HTML file. ->>> net.toggle_physics(True) ->>> net.show('mygraph.html') - -.. note:: Triggering the :meth:`toggle_physics` method allows for more fluid graph interactions +>>> net.toggle_physics(True) # Triggering the `toggle_physics` method allows for more fluid graph interactions +>>> net.show('mygraph.html') # Note that if you work from a normal python file you need to pass "notebook=False" kwarg Example: Visualizing a Game of Thrones character network -------------------------------------------------------- @@ -251,7 +249,7 @@ Using pyvis within `Jupyter `_ notebook Pyvis supports `Jupyter `_ notebook embedding through the use of the :meth:`network.Network` constructor. The network instance must be -"prepped" during instantiation by supplying the `notebook=True` kwarg. +"prepped" during instantiation by supplying the `notebook=True` kwarg, which is the default. Example: .. image:: jup.png