Hello,
I’m using the sc.pl.dotplot
function to draw dotplots, and I’m interested to get the fraction of cells and mean expression values for each dot.
If I assign the function call output to a variable dp, I can see some values related the axes, but is there a wat to get the values the dots?
I’m using this:
import scanpy as sc
adata = sc.datasets.pbmc68k_reduced()
markers = ['C1QA', 'PSAP', 'CD79A', 'CD79B', 'CST3', 'LYZ']
dp=sc.pl.dotplot(adata, markers, groupby="bulk_labels", return_fig=True)
dp
# <scanpy.plotting._dotplot.DotPlot at 0x7fd840a03df0>
dp.get_axes()
# {'mainplot_ax': <Axes: >,
# 'size_legend_ax': <Axes: title={'center': 'Fraction of cells\nin group (%)'}>,
# 'color_legend_ax': <Axes: title={'center': 'Mean expression\nin group'}>}