hyrax.verbs.visualize_v2
========================

.. py:module:: hyrax.verbs.visualize_v2


Attributes
----------

.. autoapisummary::

   hyrax.verbs.visualize_v2.logger


Classes
-------

.. autoapisummary::

   hyrax.verbs.visualize_v2.VisualizeV2


Functions
---------

.. autoapisummary::

   hyrax.verbs.visualize_v2._disable_axis_zoom


Module Contents
---------------

.. py:data:: logger

.. py:function:: _disable_axis_zoom(plot, element)

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


.. py:class:: VisualizeV2(config)

   Bases: :py:obj:`hyrax.verbs.verb_registry.Verb`


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

   .. py:method:: __init__

   Overall initialization for all verbs that saves the config


   .. py:attribute:: cli_name
      :value: 'visualize_v2'



   .. py:attribute:: add_parser_kwargs


   .. py:attribute:: REQUIRED_DATA_GROUPS
      :value: ('visualize',)



   .. py:attribute:: OPTIONAL_DATA_GROUPS
      :value: ()



   .. py:method:: setup_parser(parser: argparse.ArgumentParser)
      :staticmethod:


      CLI not implemented for this verb



   .. py:method:: run_cli(args: argparse.Namespace | None = None)

      CLI not implemented for this verb



   .. py:method:: run(**kwargs)

      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.

      :param 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.
      :rtype: VisualizeV2



   .. py:method:: restart_ui(**kwargs)

      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.

      :param 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.
      :rtype: VisualizeV2



   .. py:method:: _load_data()

      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.



   .. py:method:: _build_ui(**kwargs)

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



   .. py:method:: get_selected_df()

      Return the current selection as a DataFrame.



