lawremi / ggbio

Grid and ggplot2 based visualization for biological data
111 stars 24 forks source link

titles lost when combining several tracks #154

Open mgabriel01 opened 3 years ago

mgabriel01 commented 3 years ago

Hi,

When several tracks are combined, the title associated to each of them seems to be lost during the process :

library(VariantAnnotation)
library(ggbio)
fl <- system.file("extdata", "ex2.vcf", package="VariantAnnotation")
vcf <- readVcf(fl, "hg19")
my_test1<-autoplot(rowRanges(vcf), layout="karyogram", main="Test1")
my_test2<-autoplot(rowRanges(vcf), layout="karyogram", main="Test2")

tracks(my_test1,my_test2,main="Test3")

ggbio_example

Is there a way to have them back ?

thank you in advance for your answer.

Marc G.

sanchit-saini commented 3 years ago

tracks do not support it. It remove titles from all the supplied plots. By this, the arrangement of multiple plots gets easier.

lawremi commented 3 years ago

I agree it would be nice to have an option to keep them.