Thank you for your response. Unfortunately that set up creates a second blank plot and does the adjustment on the blank plot. fig = plt.gcf() somehow isn't retrieving the dotplot. It is able to retrieve it when I remove the return_fig part and set show to False. But then I'm not sure how to include the add_totals() method
dp = sc.pl.dotplot(
adata,
var_names = genes_for_dot_plot,
groupby = annotation,
layer = layer_to_plot,
#title = title,
#figsize = [2,2],
cmap = color_map,
swap_axes=True,
show=False
)
# Add totals (this doesn't work)
# dp = dp.add_totals().style(dot_edge_color='grey', dot_edge_lw=0.5)
# Now, get the figure and axes that were just created.
fig = plt.gcf()
ax = plt.gca()
# Apply your adjustments to this figure.
fig.subplots_adjust(bottom=0.4, left=0.2)
# Show the final adjusted plot.
plt.show()