bento.pl.comp¶
- bento.pl.comp(sdata, groupby=None, group_order=None, annotate=None, adjust=True, palette=<matplotlib.colors.LinearSegmentedColormap object>, annot_color=None, sizes=(5, 30), size_norm=(10, 100), dim_order=None, legend=True, height=5, fname=None)¶
Plot gene composition across set of shapes. Ideally, these shapes are non-overlapping.
- Parameters:
sdata (SpatialData) – The spatial data to be plotted.
groupby (str) – The column name in the data to group by.
group_order (list) – The order of the groups for plotting.
annotate (bool or list of str) – Whether to annotate the plot with gene names or a list of gene names to annotate.
adjust (bool) – Whether to adjust the text positions, by default True.
palette (str) – The color palette to use for the plot. Default is ‘red_light’.
annot_color (str) – The color to use for annotations. Default is None.
sizes (tuple) – The minimum and maximum size of the points. Default is (5, 30).
size_norm (tuple) – The normalization range for the point sizes. Default is (10, 100).
dim_order (str) – The order of the dimensions for the plot. Default is None.
legend (bool) – Whether to include a legend in the plot. Default is True.
height (int) – The height of the plot. Default is 5.
fname (str) – The filename to save the plot as. If None (default), the plot is not saved to file.