Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

thebelab broken #165

Open
akhmerov opened this issue Sep 18, 2020 · 1 comment
Open

thebelab broken #165

akhmerov opened this issue Sep 18, 2020 · 1 comment
Labels
Milestone

Comments

@akhmerov
Copy link
Member

This is from our docs.

image

Maybe it's time to switch to sphinx-thebe

@martinRenou
Copy link
Member

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:

thebe.mp4

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants