Skip to content

Commit

Permalink
add page (and screenshot) for plugin API access
Browse files Browse the repository at this point in the history
  • Loading branch information
kecnry committed Oct 18, 2024
1 parent 24f32a2 commit 25e27e7
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 0 deletions.
Binary file added docs/images/api_hint_screenshot.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions docs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -40,4 +40,5 @@ Reference/API

installation.rst
plugins.rst
plugin_api.rst
reference/api.rst
20 changes: 20 additions & 0 deletions docs/plugin_api.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
.. _plugin-apis:

*********************
Accessing Plugin APIs
*********************

Each plugin object is wrapped by a public user API which enables interacting with the plugin from
the notebook directly. The plugin API object for each plugin is accessible through ``viz.plugins``.
For example:

.. code-block:: python
plugin = viz.plugins['Plot Options']
plugin.open_in_tray()
plugin.show('popout')
When running in a notebook or lab environment, plugins provide API hints directly in the UI. To enable these, toggle the ``<>`` button in the top of the plugin.

.. figure:: images/api_hint_screenshot.png
:alt: Screenshot of API hints in the UI

0 comments on commit 25e27e7

Please sign in to comment.