anyplotlib.PlaneWidget#
- class anyplotlib.PlaneWidget(push_fn, axis='z', position=0.0, color='#00e5ff', alpha=0.12)[source]#
Bases:
WidgetA draggable axis-aligned plane in a 3-D panel.
Rendered as a translucent quad spanning the panel’s bounds, perpendicular to axis at position. Drag it in the browser to slide it along its normal — ideal as a slice selector for voxel volumes. Voxels lying on a plane are rendered more opaque (see
voxels()).- Parameters:
Examples
>>> pw = vol.add_widget("plane", axis="z", position=24) >>> @pw.add_event_handler("pointer_move") ... def on_drag(event): ... print("slice now at", pw.position) >>> pw.set(position=10) # move it from Python