Hello, New to python/matplotlib.. My scanpy dotplot axis labels are getting cut off.
I'm looking through the documentation and adjusting the figsize parameter helps, but the plot gets quite spread out.
Is there a way to just adjust the canvas size or font size?
Here is my code:
import scanpy as sc
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,
return_fig=True
)
dp.add_totals().style(dot_edge_color='grey', dot_edge_lw=0.5).show()
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