Open akhmerov opened 4 years ago
I was able to get a combination of jupyter-sphinx
and sphinx-thebe
working nicely with the following conf.py
:
extensions = [
...
'jupyter_sphinx',
'sphinx_thebe'
]
thebe_config = {
"selector": "div.jupyter_cell",
"selector_output": "div.cell_output",
"repository_url": "https://github.com/bqplot/bqplot",
"repository_branch": "stable",
}
And the following rst:
.. thebe-button:: Click me!
.. jupyter-execute::
import numpy as np
from bqplot import pyplot as plt
plt.figure(1, title="Line Chart")
np.random.seed(0)
n = 200
x = np.linspace(0.0, 10.0, n)
y = np.cumsum(np.random.randn(n))
plt.plot(x, y)
plt.show()
And this is the result:
This is from our docs.
Maybe it's time to switch to sphinx-thebe