NNSOM.plots.SOMPlots.gray_hist
- SOMPlots.gray_hist(x, perc, mouse_click=False, **kwargs)[source]
Generates a grayscale histogram for the SOM, where the shade of each hexagon represents the corresponding value from the provided percentage array.
- Parameters:
x (array-like) – The input data to be visualized in the histogram.
perc (array-like) – An array containing the percentage values to be represented by the grayscale shades, where higher values correspond to darker shades.
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 based on the grayscale values.
text (list, optional) – A list of matplotlib.text.Text objects displaying the hit counts, included if textFlag is True in the underlying hit_hist method.