In [ ]:
import k3d
plot = k3d.plot()
plot += k3d.points([0, 0, 0, 1, 1, 1])
plot.display()
Expected result:
The plot can be adjusted using mouse actions:
To return to the default camera position, press the "Camera reset" icon from the top-right toolbar
It is possible to switch the plot to fullscreen mode using the "Fullscreen" icon from the toolbar. To exit fullscreen mode press the Esc key (there should be a notification from your browser).
Especially in multiple monitor setups it may be useful to detach the plot to a dedicated window. This is achieved by clicking the "Detach widget" icon.
To save a snapshot of the current view, press the "Save screenshot" icon from the toolbar.
The filename will be generated as "K3D-", then a string of digits (technically: decimal timestamp) and then ".png". The PNG file containing the plot
's interior (no UI decorations) will be processed as a regular download.
This example was just a short description of the UI interaction with K3D plots. Some of these actions (camera adjustment and screenshot retrieval) can be done programmatically, which will be shown in other examples.
In [ ]:
plot.snapshot_include_js = False
In [ ]: