Skip to main content

sphinx_k3d_screenshot

PyPI version Conda (channel only) Documentation Status

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.

Metadata

Release files for sphinx-k3d-screenshot 0.2.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for sphinx-k3d-screenshot 0.2.1
File Size Uploaded
sphinx_k3d_screenshot-0.2.1.tar.gz 15.9 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for sphinx-k3d-screenshot 0.2.1
File Interpreter ABI Platform
sphinx_k3d_screenshot-0.2.1-py3-none-any.whl Python 3 none any Details

Total release size: 31.2 kB

Release files / sphinx_k3d_screenshot-0.2.1.tar.gz

Download URL sphinx_k3d_screenshot-0.2.1.tar.gz
Size 15.9 kB
Tags Source
SHA-256 checksum
How to use checksums
abc8a8071f40f88b43c862f12772d9ca3e3f2eac3104a0e41b2b280f92b77482
BLAKE2b-256 checksum
How to use checksums
27e77e70e04146478ed275fbf27ce3db3131b1d961299f08891178194b184cd2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.9.23

Release files / sphinx_k3d_screenshot-0.2.1-py3-none-any.whl

Download URL sphinx_k3d_screenshot-0.2.1-py3-none-any.whl
Size 15.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
a2b7db0c97077d22c96852273953e9c5eb43821085fc2c4d845aa05c1845ee5d
BLAKE2b-256 checksum
How to use checksums
c5f6017f4d560ab800dc1b5f81400a2ee7376a3518c836d3236d1059f31ca52c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.9.23

Release history Release notifications | RSS feed

This release

0.2.1 This release

2 release files

0.2.0

2 release files

0.1.2

2 release files

0.1.1

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page