Skip to main content

A directive for including a plotly figure in a Sphinx document

Project description

sphinx-plotly-directive

CI Documentation Status

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

Install

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

How to use

.. plotly::

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

The last line of a code block must end with an expression that evaluates to a plotly figure.

Development

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.0.tar.gz (10.5 kB view hashes)

Uploaded Source

Built Distribution

sphinx_plotly_directive-0.1.0-py3-none-any.whl (10.6 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