liana icon indicating copy to clipboard operation
liana copied to clipboard

Change font size for liana dotplot source headers

Open schroeme opened this issue 1 year ago • 1 comments

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

schroeme avatar Jun 08 '24 16:06 schroeme

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 :smiley:

dbdimitrov avatar Aug 06 '24 07:08 dbdimitrov