sphinx-k3d-screenshot


Namesphinx-k3d-screenshot JSON
Version 0.1.2 PyPI version JSON
download
home_pagehttps://github.com/Davide-sd/sphinx_k3d_screenshot
SummaryA directive to include K3D Jupyter's screenshots into a Sphinx document
upload_time2022-12-02 14:56:34
maintainer
docs_urlNone
authorDavide Sandona
requires_python
licenseMIT License
keywords k3d jupyter sphinx screenshot
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # sphinx_k3d_screenshot

[![PyPI version](https://badge.fury.io/py/sphinx-k3d-screenshot.svg)](https://badge.fury.io/py/sphinx-k3d-screenshot)
[![Conda (channel only)](https://img.shields.io/conda/vn/davide_sd/sphinx_k3d_screenshot?color=%2340BA12&label=conda%20package)](https://anaconda.org/Davide_sd/sphinx_k3d_screenshot)
[![Documentation Status](https://readthedocs.org/projects/sphinx-k3d-screenshot/badge/?version=latest)](https://sphinx-k3d-screenshot.readthedocs.io/en/latest/?badge=latest)

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](https://matplotlib.org/stable/api/sphinxext_plot_directive_api.html).**_

## Install

```
pip install sphinx_k3d_screenshot
```

or:

```
conda install -c davide_sd sphinx_k3d_screenshot 
```

Take a look at the [Installation page](https://sphinx-k3d-screenshot.readthedocs.io/en/latest/install.html)
to understand how to configure the extension to run on [readthedocs.org server](https://readthedocs.org).

## Usage

```python
.. 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
```

<img src="https://raw.githubusercontent.com/Davide-sd/sphinx_k3d_screenshot/master/imgs/screenshot-1.png">

Take a look at the [Examples page](https://sphinx-k3d-screenshot.readthedocs.io/en/latest/examples/index.html)
to visualize the available customization options.

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/Davide-sd/sphinx_k3d_screenshot",
    "name": "sphinx-k3d-screenshot",
    "maintainer": "",
    "docs_url": null,
    "requires_python": "",
    "maintainer_email": "",
    "keywords": "k3d jupyter sphinx screenshot",
    "author": "Davide Sandona",
    "author_email": "sandona.davide@gmail.com",
    "download_url": "https://files.pythonhosted.org/packages/ec/a6/4cdf5b68e51ff09262a0413e6d1e5c9553eae2b61ebdb3a835aac99a57f2/sphinx_k3d_screenshot-0.1.2.tar.gz",
    "platform": null,
    "description": "# sphinx_k3d_screenshot\n\n[![PyPI version](https://badge.fury.io/py/sphinx-k3d-screenshot.svg)](https://badge.fury.io/py/sphinx-k3d-screenshot)\n[![Conda (channel only)](https://img.shields.io/conda/vn/davide_sd/sphinx_k3d_screenshot?color=%2340BA12&label=conda%20package)](https://anaconda.org/Davide_sd/sphinx_k3d_screenshot)\n[![Documentation Status](https://readthedocs.org/projects/sphinx-k3d-screenshot/badge/?version=latest)](https://sphinx-k3d-screenshot.readthedocs.io/en/latest/?badge=latest)\n\nA Sphinx directive for including the screenshot of a K3D Jupyter plot\ninto a Sphinx document.\n\n_**This package is based on [matplotlib's plot directive](https://matplotlib.org/stable/api/sphinxext_plot_directive_api.html).**_\n\n## Install\n\n```\npip install sphinx_k3d_screenshot\n```\n\nor:\n\n```\nconda install -c davide_sd sphinx_k3d_screenshot \n```\n\nTake a look at the [Installation page](https://sphinx-k3d-screenshot.readthedocs.io/en/latest/install.html)\nto understand how to configure the extension to run on [readthedocs.org server](https://readthedocs.org).\n\n## Usage\n\n```python\n.. k3d-screenshot::\n\n   f = lambda r, d: 5 * np.cos(r) * np.exp(-r * d)\n   x, y = np.mgrid[-7:7:100j, -7:7:100j]\n   r = np.sqrt(x**2 + y**2)\n   z = f(r, 0.1)\n\n   fig = k3d.plot()\n   surface = surface = k3d.surface(\n      z.astype(np.float32), bounds=[-7, 7, -7, 7],\n      attribute=z.astype(np.float32),\n      color_map=k3d.colormaps.matplotlib_color_maps.viridis)\n   fig += surface\n\n   fig\n```\n\n<img src=\"https://raw.githubusercontent.com/Davide-sd/sphinx_k3d_screenshot/master/imgs/screenshot-1.png\">\n\nTake a look at the [Examples page](https://sphinx-k3d-screenshot.readthedocs.io/en/latest/examples/index.html)\nto visualize the available customization options.\n",
    "bugtrack_url": null,
    "license": "MIT License",
    "summary": "A directive to include K3D Jupyter's screenshots into a Sphinx document",
    "version": "0.1.2",
    "split_keywords": [
        "k3d",
        "jupyter",
        "sphinx",
        "screenshot"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "md5": "90d49841a45b685f19badea4536ce9cf",
                "sha256": "f82c16296f7c37fef03e8589b542d3491ee84f2c65e21fcb56aa1f0656808347"
            },
            "downloads": -1,
            "filename": "sphinx_k3d_screenshot-0.1.2-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "90d49841a45b685f19badea4536ce9cf",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": null,
            "size": 15162,
            "upload_time": "2022-12-02T14:56:32",
            "upload_time_iso_8601": "2022-12-02T14:56:32.789690Z",
            "url": "https://files.pythonhosted.org/packages/8b/6a/d88bfdd279e20fef8c84726d9c69204f28f8eb534617d293306f15aae51e/sphinx_k3d_screenshot-0.1.2-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "md5": "84bf6e7e1a6312ffb36148b92c7a47e1",
                "sha256": "e42e459b4ecc59086f13009febd10b461e8a920029f537daecb18b093f013398"
            },
            "downloads": -1,
            "filename": "sphinx_k3d_screenshot-0.1.2.tar.gz",
            "has_sig": false,
            "md5_digest": "84bf6e7e1a6312ffb36148b92c7a47e1",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 15389,
            "upload_time": "2022-12-02T14:56:34",
            "upload_time_iso_8601": "2022-12-02T14:56:34.497176Z",
            "url": "https://files.pythonhosted.org/packages/ec/a6/4cdf5b68e51ff09262a0413e6d1e5c9553eae2b61ebdb3a835aac99a57f2/sphinx_k3d_screenshot-0.1.2.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2022-12-02 14:56:34",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "github_user": "Davide-sd",
    "github_project": "sphinx_k3d_screenshot",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "sphinx-k3d-screenshot"
}
        
Elapsed time: 0.07465s