stereo.plots.PlotCollection.cluster_scatter#
- PlotCollection.cluster_scatter(res_key, groups=None, show_others=None, title=None, x_label=None, y_label=None, dot_size=None, colors='stereo_30', invert_y=True, hue_order=None, width=None, height=None, base_image=None, base_im_cmap='Greys', base_im_to_gray=False, **kwargs)[source]#
Spatial distribution ofter scatter.
- Parameters:
res_key (
str
) – cluster result key.groups (
Union
[ndarray
,list
,str
,None
]) – the group names.title (
Optional
[str
]) – the plot title.x_label (
Optional
[str
]) – the x label.y_label (
Optional
[str
]) – the y label.dot_size (
Optional
[int
]) – the dot size.colors (
Optional
[str
]) – the color list.invert_y (
Optional
[bool
]) – whether to invert y-axis.hue_order (
Optional
[set
]) – the classification method.width (
Optional
[int
]) – the figure width in pixels.height (
Optional
[int
]) – the figure height in pixels.show_plotting_scale – wheter to display the plotting scale.
out_path – the path to save the figure.
out_dpi – the dpi when the figure is saved.
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:
Spatial scatter distribution of clusters.