Skip to content

Commit

Permalink
update documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
Giancarlo Perrone committed Jul 26, 2019
1 parent 233a08d commit 6b4434a
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 0 deletions.
9 changes: 9 additions & 0 deletions pyvis/network.py
Original file line number Diff line number Diff line change
Expand Up @@ -841,4 +841,13 @@ def toggle_stabilization(self, status):
self.options.physics.toggle_stabilization(status)

def set_options(self, options):
"""
Overrides the default options object passed to the VisJS framework.
Delegates to the :meth:`options.Options.set` routine.
:param options: The string representation of the Javascript-like object
to be used to override default options.
:type options: str
"""
self.options = self.options.set(options)
Binary file added pyvis/source/set_options_ex.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 6 additions & 0 deletions pyvis/source/tutorial.rst
Original file line number Diff line number Diff line change
Expand Up @@ -167,6 +167,12 @@ parameters to your graph's physics and layout function.

.. image:: buttons.gif

.. note:: You can copy/paste the output from the `generate options` button in the above UI
into :meth:`network.Network.set_options` to finalize your results from experimentation
with the settings.

.. image:: set_options_ex.gif

Using pyviz within `Jupyter <https://jupyter.org>`_ notebook
------------------------------------------------------------

Expand Down

0 comments on commit 6b4434a

Please sign in to comment.