bedapub/besca

figure size for celllabel_quant_stackedbar

marlisese opened this issue · 1 comments

Hi all,
It would be nice to have the figure size parameters available (figsize) for this function: celllabel_quant_stackedbar. Often times it gets just squeezed if labels are long.
Thanks,
Martha

Hi Martha (@marlisese ),
would a solution like this be satisfiable for you :

import besca as bc
adata = bc.datasets.Kotliarov2020_processed()
adata.obs   = adata.obs.astype( {'batch' :  'category'})
axes_plot = bc.pl.celllabel_quant_stackedbar(adata, count_variable = 'leiden', subset_variable = 'donor')
fig = axes_plot.get_figure()
fig.set_figwidth(15)

You would still use the function, and then get back the figure as a matplotlib object to be able to modify its size.
( fig.set_size_inches(x,y) would also be a possibility)
Best
Alice