jtamames / SqueezeMeta

A complete pipeline for metagenomic analysis
GNU General Public License v3.0
346 stars 81 forks source link

SQMTOOLS PLOTTAXONOMY 45º labels #725

Closed H1889 closed 10 months ago

H1889 commented 10 months ago

Hi, I have updated my sqmtools installation in Rstudio to the last version 1.6.2, but now when I use plottaxonomy command the sample labels are shown slanted in 45º and not horizontally:

Before: image

Now: image

My Rstudio is updated to the last version. Any solution?

Thanks a lot.

H1889 commented 10 months ago

I have found it depends of the number of samples, so if I reduce the number of samples the labels are placed horizontally again. In any case, how can I use my 16 samples with the labes placed horizontally? I have tried to reduce font size but it does not work: image

fpusan commented 10 months ago

plotTaxonomy is internally using ggplot2 for plotting, I guess that this depends on internal optimizations made by ggplot depending on font size, number of elements, available plotting space and so on... There is no way to directly control label angle in plotTaxonomy. If you want such level of control you will have to get the data table from the SQM object (eg SQM$taxa$phylum$percent) and make the plot yourself.

H1889 commented 10 months ago

Ok thanks