Skip to main content

A directive to include K3D Jupyter's screenshots into a Sphinx document

Project description

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.

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

sphinx_k3d_screenshot-0.2.1.tar.gz (15.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

sphinx_k3d_screenshot-0.2.1-py3-none-any.whl (15.3 kB view details)

Uploaded Python 3

File details

Details for the file sphinx_k3d_screenshot-0.2.1.tar.gz.

File metadata

  • Download URL: sphinx_k3d_screenshot-0.2.1.tar.gz
  • Upload date:
  • Size: 15.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.9.23

File hashes

Hashes for sphinx_k3d_screenshot-0.2.1.tar.gz
Algorithm Hash digest
SHA256 abc8a8071f40f88b43c862f12772d9ca3e3f2eac3104a0e41b2b280f92b77482
MD5 059261d97a71ab3b22042ee0023c6478
BLAKE2b-256 27e77e70e04146478ed275fbf27ce3db3131b1d961299f08891178194b184cd2

See more details on using hashes here.

File details

Details for the file sphinx_k3d_screenshot-0.2.1-py3-none-any.whl.

File metadata

File hashes

Hashes for sphinx_k3d_screenshot-0.2.1-py3-none-any.whl
Algorithm Hash digest
SHA256 a2b7db0c97077d22c96852273953e9c5eb43821085fc2c4d845aa05c1845ee5d
MD5 7e9040868c5c8bfed54a599adf126402
BLAKE2b-256 c5f6017f4d560ab800dc1b5f81400a2ee7376a3518c836d3236d1059f31ca52c

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page