A directive to include K3D Jupyter's screenshots into a Sphinx document
Project description
sphinx_k3d_screenshot
A Sphinx directive for including the screenshot of a K3D Jupyter plot into a Sphinx document.
This package is based on matplotlib's plot directive.
Install
pip install sphinx_k3d_screenshot
or:
conda install -c davide_sd sphinx_k3d_screenshot
Take a look at the Installation page to understand how to configure the extension to run on readthedocs.org server.
Usage
.. k3d-screenshot::
f = lambda r, d: 5 * np.cos(r) * np.exp(-r * d)
x, y = np.mgrid[-7:7:100j, -7:7:100j]
r = np.sqrt(x**2 + y**2)
z = f(r, 0.1)
fig = k3d.plot()
surface = surface = k3d.surface(
z.astype(np.float32), bounds=[-7, 7, -7, 7],
attribute=z.astype(np.float32),
color_map=k3d.colormaps.matplotlib_color_maps.viridis)
fig += surface
fig
Take a look at the Examples page to visualize the available customization options.
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
Built Distribution
Close
Hashes for sphinx_k3d_screenshot-0.1.0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | b57c4022ba90cebe8894b81dba951dce17f1a57bc385cb19295948b740613448 |
|
MD5 | e0b5d913984fd85425a7422cffd5336e |
|
BLAKE2b-256 | f72b8f8a5e64d3cdbef14f6a96ad1b1d7d37c0d4ca626a2176d408dccd34ace8 |
Close
Hashes for sphinx_k3d_screenshot-0.1.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8d25f481160bd567df8cd9b1efc681a6b5d4bb738f00774334a5b4e5c18368a6 |
|
MD5 | 56935aeead5d08abe4626064f729842a |
|
BLAKE2b-256 | 59df6bea82437b977a0545a19bb93d45c72910bac4b99060a18bd81a551ab44c |