stereo.plots.PlotCollection.spatial_scatter_by_gene¶
- PlotCollection.spatial_scatter_by_gene(gene_name, dot_size=None, palette='CET_L4', color_bar_reverse=True, width=None, height=None, x_label='spatial1', y_label='spatial2', title=None, vmin=None, vmax=None, **kwargs)[source]¶
Draw the spatial distribution of expression quantity of the gene specified by gene names.
- Parameters:
gene_name (
Union[str,list,ndarray]) – a gene or a list of genes you want to show.dot_size (
Optional[int]) – the dot size, defaults toNone.palette (
Optional[str]) – the color theme, defaults to'CET_L4'.color_bar_reverse (
Optional[bool]) – if True, reverse the color bar, defaults to Falsewidth (
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.
x_label (
Optional[str]) – the x label.y_label (
Optional[str]) – the y label.title (
Optional[str]) – the title label.vmin (
Optional[float]) – The value representing the lower limit of the color scale. Values smaller than vmin are plotted with the same color as vmin.vmax (
Optional[float]) – The value representing the higher limit of the color scale. Values greater than vmax are plotted with the same color as vmax.