spatialtis.plotting.cell_map#
- spatialtis.plotting.cell_map(data, rois, ncol=5, use_shape=False, show_neighbors=False, selected_types=None, masked_type_name='Other', masked_type_color='#d3d3d3', figsize=None, wspace=0, hspace=0.1, types_colors=None, cell_type_key=None, shape_key=None, centroid_key=None, roi_key=None, **plot_options)[source]#
Visualize cells and neighbors relationship in ROI
- Parameters
- dataAnnData
The AnnData object for plotting.
- roislist of str
A list of ROI name that you want to plot.
- ncolint
The number of columns in the figure layout.
- use_shapebool
Plot cell in polygon only when shape data is available.
- show_neighborsbool
Plot the neighbors’ relationship.
- selected_typeslist of str
Select your interested cell types.
- masked_type_namestr, default: ‘Other’
The name of the cell types not in selected_types.
- masked_type_colorcolor-like, default: ‘#d3d3d3’
The color of the cell types not in selected_types.
- figsizetuple of float
The size of figure.
- wspacefloat, default: 0
The space between plots vertically.
- hspacefloat, default: 0.1
The space between plots horizontally.
- types_colorsdict
Change the color for each cell type, Key is the type and value is the color.
- cell_type_keystr, default:
Config.cell_type_key
The column in .obs to store cell types.This will temporarily overwrite the global config.
- shape_keystr, default:
Config.shape_key
The column in .var to store cell shape in wkt format. This will temporarily overwrite the global config.
- centroid_keystr or list of str, default:
Config.centroid_key
The column in .obs or .obsm to store centroid. This will temporarily overwrite the global config.
- roi_keystr, default:
Config.roi_key
The columns in .obs that specific ROI.This will temporarily overwrite the global config.
- **plot_options:
Pass to
milkviz.point_map()
ormilkviz.polygon_map()