bioFAM / MOFA

Multi-Omics Factor Analysis
GNU Lesser General Public License v3.0
231 stars 57 forks source link

FactorBeeswarmPlot uses unnecessary x aesthetic #7

Closed DarwinAwardWinner closed 6 years ago

DarwinAwardWinner commented 6 years ago

FactorBeesawemPlot uses the "factor" variable as both the x value and the facet. This results in a lot of wasted space if you want to plot multiple factors. I get a better plot by doing something like this:

FactorBeeswarmPlot(mofaobj, 1:10, color_by = "time_point") + aes(x=0) + xlab("") + facet_wrap(~factor, scales="free") + scale_x_continuous(breaks=NULL)

This removes the irrelevant X scale entirely, puts each factor in its own facet, allows each factor to spread out horizontally throughout its entire facet, and gives each factor its own y scale. The result looks like this:

image

bv2 commented 6 years ago

Thanks a lot for reporting this bug and helping to improve the package! We removed the unnecessary x axis and incorporated your suggestion in the FactorBeeswarmPlot function.