I want to plot CNV using CNV-seq output, but I found that chromosome names are on the top of the picture, how could I move the chromosome names to the bottom. Here is my code used to plot CNV:
data = read.table('/Users/andy/Desktop/plot_R/17A020980.sorted.cnr', head=T, sep='\t', check.names = F)
data$chromosome = factor(data$chromosome, levels=c(paste0('chr', 1:22), 'chrX', 'chrY'))
p = ggplot(data, aes(start, 2*2^data$log2, color=chromosome)) +geom_point()+scale_x_discrete(breaks=NULL)+theme_minimal()+theme(legend.position="none")+xlab(NULL)+facet_grid(.~chromosome, scale="free"))
p + scale_y_continuous(name="Copy Number", limits = c(0,8))
And the result is shown in this picture