NNSOM.plots.SOMPlots.custom_cmplx_hit_hist

SOMPlots.custom_cmplx_hit_hist(x, face_labels, edge_labels, edge_width, mouse_click=False, **kwargs)[source]

Generates a custom complex hit histogram for the SOM, allowing for flexible customization of the hexagon face colors, edge colors, and edge widths.

Parameters:
  • x (array-like) – The input data to be visualized in the histogram.

  • face_labels (array-like) – An array containing the labels or values to be represented by the face colors of the hexagons.

  • edge_labels (array-like) – An array containing the labels or values to be represented by the edge colors of the hexagons.

  • edge_width (array-like) – An array containing the values for the edge widths of the hexagons.

  • mouse_click (bool, optional) – If True, enables the plot to respond to mouse clicks, allowing for interactive functionality such as querying or modifying neuron data, by default False.

  • **kwargs (dict) – Arbitrary keyword arguments that can be passed to the event handler onpick when an interactive element is clicked. Common parameters could include data specific to the plot or visualization settings.

Returns:

  • fig (matplotlib.figure.Figure) – The Figure object containing the plot.

  • ax (matplotlib.axes.Axes) – The Axes object containing the plot elements.

  • patches (list) – A list of matplotlib.patches.Patch objects representing the inner hexagons colored and styled based on the provided face labels, edge labels, and edge widths.

  • text (list) – A list of matplotlib.text.Text objects displaying the hit counts within each hexagon.

Raises:

ValueError – If the input data or label arrays have incorrect dimensions or lengths.