stnmf.plot.weights

stnmf.plot.weights(w, m, colors='#1b9e77', ax=None, yticks=True, **kwargs)

Plot the average weights of the modules

Parameters:
  • w ((r,) or (r,sp) array_like) – Weight or weights of each module. Either already averaged (r,) or all weights (r, sp), where r is the number of modules and sp is the number of spikes

  • m ((l,) or (r,x,y) array_like) – Indices of localized modules or the spatial modules themselves, where l is the number of localized modules or r is the number of all modules and x and y are the spatial dimensions. If modules, localized modules are determined based on the Moran’s I threshold in moransi_threshold

  • colors (color, iterable, matplotlib.colors.Colormap, optional) – Single color or color sequence for the data points to differentiate localized modules. If single color, the same color is used on the plots of all localized subunits. If iterable or colormap, colors are iterated over modules. Default is ‘#1b9e77’

  • ax (matplotlib.axes.Axes, optional) – Existing figure axes to draw the weights into. If None, a new figure is created. Default is None

  • yticks (bool, optional) – Display weights on y-axis. Default True

Keyword Arguments:

moransi_threshold (float, optional) – Moran’s I threshold to differentiate localized modules. Default is 0.25

Raises:

ValueError – If m or w has incorrect shape.