Drawing
Events
Bindings
Animation
Lasso
Rectangles
Chart
Images
Transitions
Assemblies
Frames
N-Dimensional Frames
N-Dimensional Scatter Plot
Network Explorer
Array explorer
Color chooser
Opacity Sliders
Edit polygon
Vector Field

This is an example page for the jp_doodle package.

jp_doodle makes implementing special purpose interactive visualizations easy.

Quick references: Javascript API; Python API.

Miscellaneous Demos: Image detail viewer..

These example pages use stand alone Javascript, but the code used to implement them can be transliterated to Python and implemented using Jupyter widgets (modulo some subtleties).
Please see the Jupyter notebooks in the package for additional discussion and documentation.
Please use Binder to easily run the Jupyter notebooks of the package.

Assemblies

Assembly definitions may be specified using Javascript and attached to a jp_doodle canvas. The assemblies describe how to draw composite objects which are manipulated as primative units in the jp_doodle drawing system.

This demonstration attaches a "teddy bear" assembly definition and then creates some teddy bear assemblies and other standard assemblies on the canvas.

You may move the assemblies by mousing down on the object and dragging it to a new location and then mousing up.

Code

Discussion

As mention in the code comments, assembly definitions are tightly integrated into the redraw logic and cannot be defined using callbacks to Jupyter Python kernels (they must be defined in the browser Javascript context).

Assembly definitions which use other assembly definitions must refer to the other assembly indirectly using assembler.assembly, for example

assembler.assembly({ assembly: "arrow", x1: 0, y1:0, x2:100, y2:0, ... });
See the draw_double_arrow definition in the source code for an example.

The arrow, double arrow, star, and circle arrow assemblies are automatically built in for all dual canvases.