Skip to content

A directive for including a Plotly figure in a Sphinx document.

License

Notifications You must be signed in to change notification settings

harupy/sphinx-plotly-directive

Repository files navigation

sphinx-plotly-directive

pypi badge CI Documentation Status Imports: isort Code style: black

A directive for including a Plotly figure in a Sphinx document.

This package is based on matplotlib's plot directive.

Install

# pypi
pip install sphinx-plotly-directive

# dev version
pip install git+https://github.com/harupy/sphinx-plotly-directive.git

Usage

Source:

.. plotly::

   import plotly.express as px
   px.scatter(x=[0, 1, 2, 3, 4], y=[0, 1, 4, 9, 16])

Output:

See documentation for details.

Development

Install dependencies

pip install -e ".[dev]"

Format code

flake8 .
isort .
black .

Run tests

pytest tests

Build document

cd docs
make html

About

A directive for including a Plotly figure in a Sphinx document.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages