Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

move LIANA+ plots to matplotlib and seaborn? [User Opinons Welcome] #83

Open
dbdimitrov opened this issue Jan 26, 2024 · 5 comments
Open
Assignees
Labels
enhancement New feature or request

Comments

@dbdimitrov
Copy link
Collaborator

dbdimitrov commented Jan 26, 2024

liana.pl currently relies on plotnine. While I chose this library due to how convenient it is to generate plots (and consistency with ggplot2), it's incompatibility with matplotlib is a drawback.

Incompatibility with matplotlib both in terms of not being able to append subplots, but also various unwanted formatting interactions.

I am considering changing from plotnine to matplotlib in a future release.

Any opinions for and against are welcome.

@dbdimitrov dbdimitrov added the enhancement New feature or request label Jan 26, 2024
@dbdimitrov dbdimitrov self-assigned this Jan 26, 2024
@dbdimitrov dbdimitrov changed the title move LIANA+ plots to matplotlib and seaborn? move LIANA+ plots to matplotlib and seaborn? [User Opinons Welcome] Jan 26, 2024
@dbdimitrov dbdimitrov pinned this issue Jan 26, 2024
@earmingol
Copy link
Contributor

Have you tried lets-plot? https://lets-plot.org/

It's also ggplot-inspired. I haven't tried yet but it's on my to-do list.

@dnjst
Copy link

dnjst commented Feb 14, 2024

I'm very much for this possibility! Matplotlib is very customizable, and fits well into the scanpy/scverse ecosystem well. Returning plots as objects like sc.pl.dotplot() and others allows further customization of text which are needed for publication - e.g. italicizing gene names, grouping interactions into categories, and other bespoke things. So having a modifiable object as the output, and not just printing the plot, is very helpful. Seaborn heatmaps/clustermaps return as objects which are customizable as well.

@dbdimitrov
Copy link
Collaborator Author

dbdimitrov commented Feb 15, 2024

@earmingol thanks, this one looks really cool, esp for spatial plots.

I was thinking more in the lines of @dnjst since I recently had to make some rather complicated plots, with panels combining liana and scverse ecosystem plots (i.e. matplotlib), and it's a struggle putting them together.

So, I thought I should remake all liana plots from plotnine (which I do like for personal use) to matpllib just for the sake of interoperability with other scverse plotting (and it provides detailed options to modify basically every element indeed @dnjst)

@dbdimitrov
Copy link
Collaborator Author

It would also allow us to avoid the issues we experienced with plotnine and matplotlib @earmingol :)

@earmingol
Copy link
Contributor

I totally support the matplotlib idea haha, just curious about lets-plot since it looks pretty easy to use and well maintained (it's a project from JetBrains)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants