我正在使用这行代码制作CDF图:
library(ggplot2)
ExpDF <- data.frame(x=c('gene1','gene2','gene3','gene4'),"FC"=c(1,2,3,4))
ts_miR_15 <- data.frame(x=c('gene1','gene3','gene4'),"FC"=c(1,3,4))
ahc_miR_15_3UTR <- data.frame(x=c('gene1','gene4','gene12'),"FC"=c(1,4,12))
g <- ggplot(data = NULL)
g + geom_step(aes(x=ExpDF$FC, color="All_genes"),stat="ecdf") +
geom_step(aes(x= ts_miR_15$FC, color="Targetscan_miR-15/16"), stat="ecdf") +
geom_step(aes(x= ahc_miR_15_3UTR$FC, color="3UTR_miR-15/16_seed"), stat="ecdf") +
scale_colour_manual("Subsets", values = c("All_genes"='black',
"Targetscan_miR-15/16"='orange',
"3UTR_miR-15/16_seed"='red'))
...(等等每个额外的data.frame
我希望能够重新排列图例的标签,以便&#34; All_genes&#34;在最顶层(并且最好在我想要的任何奥得河中)。我更愿意将data.frames分开,因为它们中有不同数量的基因(标记行),其中一些是另一个的子集。