SpatialQuery.spatial_query.plot_fov

spatial_query.plot_fov(min_cells_label=50, title='Spatial distribution of cell types', figsize=(10, 5), save_path=None)[source]

Plot the cell type distribution of a single field of view (FOV).

Parameters:
  • min_cells_label (int, default=50) – Minimum number of cells required for a cell type to be displayed in the plot. Cell types with fewer cells will be excluded from the legend.

  • title (str, default='Spatial distribution of cell types') – Title of the figure.

  • figsize (tuple, default=(10, 5)) – Figure size as (width, height) tuple.

  • save_path (str, optional) – Path to save the figure. If None, the figure will not be saved.

Returns:

Displays a scatter plot showing spatial distribution of cell types, with each cell type colored differently. The legend shows cell types with at least min_cells_label cells.

Return type:

None