NNSOM.plots.SOMPlots.plt_stem

SOMPlots.plt_stem(x, y, mouse_click=False, connect_pick_event=True, **kwargs)[source]

Generates a stem plot visualization for the SOM, displaying the input data and neuron responses.

Parameters:
  • x (array-like) – The input data or independent variable for the stem plot.

  • y (array-like) – The neuron responses or dependent variable for the stem plot, where each row corresponds to a neuron.

  • 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.

  • connect_pick_event (bool, optional) – If True, connects a pick event that triggers when a neuron is clicked, by default True.

  • **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.

  • h_axes (list) – A list of matplotlib.axes.Axes objects, each containing a stem plot for a single neuron.