comparison makeblobplot.R @ 6:b45fc20c7acd

resize legend and removed facet
author Eduardo <eduardoalves@abdn.ac.uk>
date Sat, 28 Nov 2015 11:26:37 +0000
parents 0101d7d1211f
children
comparison
equal deleted inserted replaced
5:dfa4f03b5baa 6:b45fc20c7acd
66 for (t in levels(mfilt[,taxlevel])) { 66 for (t in levels(mfilt[,taxlevel])) {
67 g <- g + geom_point(data=mfilt[mfilt[,taxlevel]==t,],aes_string(x="gc", y="cov", colour=taxlevel), size=2, alpha=I(1/3)) 67 g <- g + geom_point(data=mfilt[mfilt[,taxlevel]==t,],aes_string(x="gc", y="cov", colour=taxlevel), size=2, alpha=I(1/3))
68 } 68 }
69 #y_axis_breaks = c(1,2,5,10,20,50,100,200,500,1000); 69 #y_axis_breaks = c(1,2,5,10,20,50,100,200,500,1000);
70 g<-g + 70 g<-g +
71 facet_wrap(~read_set, ncol=numcols) + 71 #facet_wrap(~read_set, ncol=numcols) +
72 #scale_y_log10() + 72 scale_y_log10() +
73 scale_x_continuous(limits=c(1e-307, 1),breaks = seq(0,1,.1)) + 73 scale_x_continuous(limits=c(1e-307, 1),breaks = seq(0,1,.1)) +
74 labs(x="GC content", y="Read coverage") + 74 labs(x="GC content", y="Read coverage") +
75 guides(colour = guide_legend(nrow=3, override.aes = list(alpha = 1,size=10))) + 75 guides(colour = guide_legend(nrow=3, override.aes = list(alpha = 1,size=10))) +
76 theme ( 76 theme (
77 strip.text.x = element_text(colour = "black", size = 25, vjust = 0.5), 77 strip.text.x = element_text(colour = "black", size = 25, vjust = 0.5),
78 axis.text.x = element_text(colour = "black", size = 25, vjust = 1), 78 axis.text.x = element_text(colour = "black", size = 25, vjust = 1),
79 axis.text.y = element_text(colour = "black", size = 25, vjust = 0.5), 79 axis.text.y = element_text(colour = "black", size = 25, vjust = 0.5),
80 axis.title.x = element_text(colour = "black", size = 25, vjust = 0), 80 axis.title.x = element_text(colour = "black", size = 25, vjust = 0),
81 axis.title.y = element_text(colour = "black", size = 25, hjust = 0.5, vjust = 0.5, angle=90), 81 axis.title.y = element_text(colour = "black", size = 25, hjust = 0.5, vjust = 0.5, angle=90),
82 legend.text = element_text(colour = "black", size = 25, vjust = 0), 82 legend.text = element_text(colour = "black", size = 15, vjust = 0),
83 legend.title = element_text(colour = "black", size = 25, vjust = 0, hjust = 0, lineheight=1), 83 legend.title = element_text(colour = "black", size = 15, vjust = 0, hjust = 0, lineheight=1),
84 legend.justification=c(1,1), legend.position="bottom", legend.direction="horizontal" 84 legend.justification=c(1,1), legend.position="bottom", legend.direction="horizontal"
85 ) 85 )
86 g 86 g
87 dev.off() 87 dev.off()