Skip to main content

A directive for including a plotly figure in a Sphinx document

Project description

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

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

sphinx-plotly-directive-0.1.3.tar.gz (12.3 kB view hashes)

Uploaded Source

Built Distribution

sphinx_plotly_directive-0.1.3-py3-none-any.whl (12.9 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page