MCPcopy
hub / github.com/widgetti/ipyvolume

github.com/widgetti/ipyvolume @v0.6.3 sqlite

repository ↗ · DeepWiki ↗ · release v0.6.3 ↗
3,994 symbols 12,372 edges 62 files 715 documented · 18%
README

ipyvolume

Join the chat at https://gitter.im/maartenbreddels/ipyvolume Documentation Version Anaconda-Server Badge Coverage Status Build Status

Try out in mybinder: Binder

3d plotting for Python in the Jupyter notebook based on IPython widgets using WebGL.

Ipyvolume currently can * Do (multi) volume rendering. * Create scatter plots (up to ~1 million glyphs). * Create quiver plots (like scatter, but with an arrow pointing in a particular direction). * Render isosurfaces. * Do lasso mouse selections. * Render in the Jupyter notebook, or create a standalone html page (or snippet to embed in your page). * Render in stereo, for virtual reality with Google Cardboard. * Animate in d3 style, for instance if the x coordinates or color of a scatter plots changes. * Animations / sequences, all scatter/quiver plot properties can be a list of arrays, which can represent time snapshots. * Stylable (although still basic) * Integrates with * ipywidgets for adding gui controls (sliders, button etc), see an example at the documentation homepage * bokeh by linking the selection * bqplot by linking the selection

Ipyvolume will probably, but not yet: * Render labels in latex. * Show a custom popup on hovering over a glyph.

Documentation

Documentation is generated at readthedocs: Documentation

Screencast demos

Animation

screencast

(see more at the documentation)

Volume rendering

screencast

Glyphs (quiver plots)

screencast quiver

Installation

If you want to use Jupyter Lab, please use version 3.0.

Using pip

Advice: Make sure you use conda or virtualenv. If you are not a root user and want to use the --user argument for pip, you expose the installation to all python environments, which is a bad practice, make sure you know what you are doing.

$ pip install ipyvolume

Conda/Anaconda

$ conda install -c conda-forge ipyvolume

Pre-notebook 5.3

If you are still using an old notebook version, ipyvolume and its dependend extension (widgetsnbextension) need to be enabled manually. If unsure, check which extensions are enabled:

$ jupyter nbextension list

If not enabled, enable them:

$ jupyter nbextension enable --py --sys-prefix ipyvolume
$ jupyter nbextension enable --py --sys-prefix widgetsnbextension

Pip as user: (but really, do not do this)

You have been warned, do this only if you know what you are doing, this might hunt you in the future, and now is a good time to consider learning virtualenv or conda.

$ pip install ipyvolume --user
$ jupyter nbextension enable --py --user ipyvolume
$ jupyter nbextension enable --py --user widgetsnbextension

Developer installation

$ git clone https://github.com/maartenbreddels/ipyvolume.git
$ cd ipyvolume
$ pip install -e . notebook jupyterlab
$ (cd js; npm run build)
$ jupyter nbextension install --py --overwrite --symlink --sys-prefix ipyvolume
$ jupyter nbextension enable --py --sys-prefix ipyvolume
# for jupyterlab (>=3.0), symlink share/jupyter/labextensions/bqplot-image-gl
$ jupyter labextension develop . --overwrite

Developer workflow

Jupyter notebook (classical)

Note: There is never a need to restart the notebook server, nbextensions are picked up after a page reload.

Start this command:

$ (cd js; npm run watch)

It will * Watch for changes in the sourcecode and run the typescript compiler for transpilation of the src dir to the lib dir. * Watch the lib dir, and webpack will build (among other things), ROOT/ipyvolume/static/index.js.

Refresh the page.

Extension points exported contracts — how you extend this code

IArrayValues (Interface)
(no doc)
js/src/values.ts

Core symbols most depended-on inside this repo

n
called by 3333
docs/source/examples/js/embed-amd_v0.18.0.js
push
called by 1898
docs/source/examples/js/embed-amd_v0.18.0.js
get
called by 1193
docs/source/examples/js/embed-amd_v0.18.0.js
r
called by 816
docs/source/examples/js/embed-amd_v0.18.0.js
t
called by 688
docs/source/examples/js/embed-amd_v0.18.0.js
replace
called by 670
ipyvolume/moviemaker.py
i
called by 577
docs/source/examples/js/embed-amd_v0.18.0.js
copy
called by 544
docs/source/examples/js/embed-amd_v0.18.0.js

Shape

Function 2,674
Method 1,097
Class 222
Interface 1

Languages

TypeScript93%
Python7%

Modules by API surface

docs/source/examples/js/ipyvolume_v0.6.0-dev.1.js2,113 symbols
docs/source/examples/js/embed-amd_v0.18.0.js1,229 symbols
js/src/figure.ts97 symbols
ipyvolume/pylab.py74 symbols
ipyvolume/widgets.py37 symbols
js/src/volume.ts34 symbols
docs/source/examples/js/require.min.v2.3.4.js33 symbols
js/src/three/OrbitControls.js31 symbols
ipyvolume/test_all.py30 symbols
js/src/mesh.ts28 symbols
js/src/scatter.ts27 symbols
ipyvolume/serialize.py23 symbols

Dependencies from manifests, versioned

@jupyter-widgets/base1 || ^2.0.2 || ^3 || · 1×
@jupyter-widgets/controls1 || ^2 · 1×
@jupyter-widgets/jupyterlab-manager0.28.0 · 1×
@jupyterlab/builder3.0.0 · 1×
@jupyterlab/galata3.0.11-2 · 1×
@types/chai4.1.4 · 1×
@types/d35.7.2 · 1×
@types/expect.js0.3.29 · 1×
@types/mocha2.2.48 · 1×
@types/node12.0.2 · 1×
@types/requirejs2.1.31 · 1×
@types/three0.93.4 · 1×

For agents

$ claude mcp add ipyvolume \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact