smurf.plot_cellcluster_position¶
- smurf.plot_cellcluster_position(cell_cluster_final, col_num=5)¶
Plots the spatial distribution of cell clusters and individual cell types.
This function visualizes the overall distribution of all cell clusters and creates separate plots for each individual cell type. It arranges the plots in a grid layout based on the specified number of columns.
- Parameters:
cell_cluster_final (numpy.ndarray) – A 2D NumPy array where each element corresponds to a cell cluster label at a particular spatial position. Cluster labels are integers starting from 0 (background or unassigned) up to the maximum number of clusters.
col_num (int, optional) – The number of columns to use in the grid layout for subplots. Determines how the plots are arranged. Defaults to 5.
- Returns:
None. The function displays the plots and closes the figure after rendering.
- Return type:
None
- Example:
>>> # Assuming 'cell_cluster_final' is your cluster label array >>> plot_cellcluster_position(cell_cluster_final, col_num=4)