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

Change font size for liana dotplot source headers #154

Open
schroeme opened this issue Jun 8, 2024 · 1 comment
Open

Change font size for liana dotplot source headers #154

schroeme opened this issue Jun 8, 2024 · 1 comment

Comments

@schroeme
Copy link

schroeme commented Jun 8, 2024

I have long (15+ character) strings for my source cluster names, and when I call liana.pl.dotplot(), the resulting plot has headers that overlap with one another and are illegible (see attached screenshot). I also get the seemingly related warning: Fontsize 0.00 < 1.0 pt not allowed by FreeType. Setting fontsize = 1 pt. Is there a way to manually specify font size, or rotate the labels so they are vertical?

Thanks,
Margaret

Screen Shot 2024-06-08 at 12 21 16 PM
@dbdimitrov
Copy link
Collaborator

Hi @schroeme,

Sorry for the delayed response. You can modify the ggplot2 object that liana returns as any other object. So, indeed you could modify/rotate the text from the facet (for the text you show) in any way you wish via the theme method from ggplot2. You could also consider using SCpubr which provides publication-quality version of this plot: https://github.com/enblacar/SCpubr.
However, I have tried it and I doubt it would look better either. Maybe not the most computational advice, but you could consider shortening the names a bit 😃

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

No branches or pull requests

2 participants