saezlab / liana-py

LIANA+: an all-in-one framework for cell-cell communication
http://liana-py.readthedocs.io/
GNU General Public License v3.0
167 stars 21 forks source link

Bug report for a tileplot function. #49

Closed partrita closed 1 year ago

partrita commented 1 year ago

Here is my code.

my_plot = li.pl.tileplot(adata = adata,
                         # NOTE: fill & label need to exist for both
                         # ligand_ and receptor_ columns
                         fill='means',
                         label='props',
                         label_fun=lambda x: f'{x:.2f}',
                         top_n=10,
                         orderby='cellphone_pvals',
                         orderby_ascending=True,
                         source_labels=["T cell", "NK cell",],
                         target_labels=["DC", "IFN-TAMs", "Inflam-TAMs", "Prolif-TAMs", "Reg-TAMs", "LA-TAMs", "Monocyte", "Neutrophils"],
                         # uns_key='cpdb_res' # NOTE: default is 'liana_res',
                         figure_size=(10, 6),
                         )
my_plot

This is my plot.

as you see, The scales of the left and right colormaps are different.

Thank you for fix, in advance.

dbdimitrov commented 1 year ago

Hi @partrita, I assume you refer to the source/target box sizes being fixed, while there are vastly different numbers of cell types within the two?

I will see if there is some way to change the way that - it would largely depend on plotnine (and matplotlib).