Skip to content

error in bc.pl.riverplot_2categories() figsize param with besca253 #346

Description

@llumdi

Hi,
when using the latest conda environment from @schmucr1 besca253_240415 I get the following error;

bc.pl.riverplot_2categories(adata, ['celltype1', 'celltype2'], figsize=(1400,600))
---------------------------------------------------------------------------
AttributeError                            Traceback (most recent call last)
Cell In[7], line 1
----> 1 bc.pl.riverplot_2categories(adata, ['celltype1', 'celltype2'], figsize=(1400,600))

File /projects/site/pred/scseq/conda/envs/besca253_240415/lib/python3.9/site-packages/besca/pl/_riverplot.py:103, in riverplot_2categories(adata, categories, palette, threshold, figsize)
    101 fig = go.Figure(dict(data=[data]))
    102 if figsize is not None:
--> 103     fig.set_figheight(figsize[1])
    104     fig.set_figwidth(figsize[0])
    105 return fig

AttributeError: 'Figure' object has no attribute 'set_figheight'

I don't get this error with previous conda environement despite the besca function not being updated lately. So I assume is due to a version change of some package dependency, maybe matplotlib?

Could you have a look?

Also, it would be good to indicate the units in the function description for figsize (is this in pixel, cm? etc) and add this param usage in some of the examples.

Thanks,
Llucia

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions