hyrax.verbs.visualize_v2#

Attributes#

Classes#

VisualizeV2

Verb to create a hexbin visualization of a 2D latent space.

Functions#

_disable_axis_zoom(plot, element)

Bokeh hook: disable axis-only zoom and align tick marks inward.

Module Contents#

logger[source]#
_disable_axis_zoom(plot, element)[source]#

Bokeh hook: disable axis-only zoom and align tick marks inward.

class VisualizeV2(config)[source]#

Bases: hyrax.verbs.verb_registry.Verb

Verb to create a hexbin visualization of a 2D latent space.

__init__()[source]#

Overall initialization for all verbs that saves the config

cli_name = 'visualize_v2'[source]#
add_parser_kwargs[source]#
REQUIRED_DATA_GROUPS = ('visualize',)[source]#
OPTIONAL_DATA_GROUPS = ()[source]#
static setup_parser(parser: argparse.ArgumentParser)[source]#

CLI not implemented for this verb

run_cli(args: argparse.Namespace | None = None)[source]#

CLI not implemented for this verb

run(**kwargs)[source]#

Generate an interactive hexbin visualization of a latent space projected to 2D.

Uses HoloViews HexTiles with datashader for adaptive hexbin aggregation, box/lasso selection, a metadata table, and tabbed detail plots.

Parameters:

kwargs – Additional keyword arguments passed as HexTiles opts overrides.

Returns:

This verb instance. Use it to call restart_ui() or get_selected_df() after the UI has been displayed.

Return type:

VisualizeV2

restart_ui(**kwargs)[source]#

Rebuild and re-display the Panel UI without reloading data.

Call this after a Jupyter websocket disconnect instead of re-running the cell. The expensive data-loading step is skipped — only the widgets are rebuilt.

Parameters:

kwargs – Additional keyword arguments passed as HexTiles opts overrides.

Returns:

This verb instance. Use it to call restart_ui() or get_selected_df() after the UI has been displayed.

Return type:

VisualizeV2

_load_data()[source]#

Load dataset and build the points DataFrame.

Guards with a _data_loaded sentinel so the expensive steps only run once per verb instance. Safe to call multiple times.

_build_ui(**kwargs)[source]#

Build and display the Panel UI using data already loaded by _load_data().

get_selected_df()[source]#

Return the current selection as a DataFrame.