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
File details
Details for the file sphinx_k3d_screenshot-0.2.0.tar.gz
.
File metadata
- Download URL: sphinx_k3d_screenshot-0.2.0.tar.gz
- Upload date:
- Size: 15.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.9.16
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1142fbb53b84e2eb41a74495d7603d20925e36af451ad2a37b3e7a3879c560e4 |
|
MD5 | 1a6c55282e3c926272ce6b9b2272b55b |
|
BLAKE2b-256 | fc213c777e9d131d04b201d5c344087f1e88842d84491e4a4767479a0585db07 |
File details
Details for the file sphinx_k3d_screenshot-0.2.0-py3-none-any.whl
.
File metadata
- Download URL: sphinx_k3d_screenshot-0.2.0-py3-none-any.whl
- Upload date:
- Size: 15.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.9.16
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7802f482d0b222e5de41a33474d1ecf0b7d354915ce62c87a88808cc35aa383c |
|
MD5 | 781d80982d91e78f4208dbaf06d04c5a |
|
BLAKE2b-256 | 20883dc65c10ba6f6223f10fa7b4805d4c36adb61bc9239c1e91e216015cb400 |