stereo.plots.PlotCollection.cells_plotting#
- PlotCollection.cells_plotting(color_by='total_count', color_key=None, bgcolor='#2F2F4F', width=None, height=None, fg_alpha=0.5, base_image=None, base_im_to_gray=False)[source]#
Plot the cells.
- Parameters:
color_by (
Literal
['total_count'
,'n_genes_by_counts'
,'gene'
,'cluster'
]) – spcify the way of coloring, default to ‘total_count’. if set to ‘gene’, you need to specify a gene name bycolor_key
. if set to ‘cluster’, you need to specify the key to get cluster result bycolor_key
.color_key (
Optional
[str
]) – the key to get the data to color the plot, it is ignored when thecolor_by
is set to ‘total_count’ or ‘n_genes_by_counts’.bgcolor (
Optional
[str
]) – set background color.width (
Optional
[int
]) – the figure width in pixels.height (
Optional
[int
]) – the figure height in pixels.fg_alpha (
Optional
[float
]) – the alpha of foreground image, between 0 and 1, defaults to 0.5 this is the colored image of the cells.base_image (
Optional
[str
]) – the path of the ssdna image after calibration, defaults to None it will be located behide the image of the cells.reorganize_coordinate –
if the data is merged from several slices, whether to reorganize the coordinates of the obs(cells), if set it to a number, like 2, the coordinates will be reorganized to 2 columns on coordinate system as below:
data1 data2data3 data4data5 …… …if set it to
False
, the coordinates will not be changed.horizontal_offset_additional – the additional offset between each slice on horizontal direction while reorganizing coordinates.
vertical_offset_additional – the additional offset between each slice on vertical direction while reorganizing coordinates.
- Returns:
Cells distribution figure.