Skip to content

Commit 22054a5

Browse files
authored
Update README (#7)
1 parent 14ee2c9 commit 22054a5

File tree

1 file changed

+25
-3
lines changed

1 file changed

+25
-3
lines changed

README.md

Lines changed: 25 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,44 @@
11
# sphinx-plotly-directive
22

3+
![CI](https://github.com/harupy/sphinx-plotly-directive/workflows/CI/badge.svg)
4+
[![Documentation Status](https://readthedocs.org/projects/sphinx-plotly-directive/badge/?version=latest)](https://sphinx-plotly-directive.readthedocs.io/en/latest/?badge=latest)
5+
36
A directive for including a Plotly figure in a Sphinx document.
47

5-
## Format code
8+
## Install
9+
10+
```
11+
pip install git+https://github.com/harupy/sphinx-plotly-directive.git
12+
```
13+
14+
## How to use
15+
16+
```
17+
.. plotly::
18+
19+
import plotly.express as px
20+
px.scatter(x=[0, 1, 2, 3, 4], y=[0, 1, 4, 9, 16])
21+
```
22+
23+
The last line of a code block must end with an expression that evaluates to a plotly figure.
24+
25+
## Development
26+
27+
### Format code
628

729
```
830
flake8 .
931
isort .
1032
black .
1133
```
1234

13-
## Run tests
35+
### Run tests
1436

1537
```
1638
pytest tests
1739
```
1840

19-
## Build document
41+
### Build document
2042

2143
```
2244
cd docs

0 commit comments

Comments
 (0)