服务热线
178 0020 3020
#2017,12,26,20:24 at BANGKOK DON MUANG Airport T1 Gate3
install.packages("ggplot2")
install.packages("reshape2")
install.packages("scales")
library("ggplot2")
library("reshape2")
library("scales")
mydata<-read.csv(file.choose(),header = T)
data1<-melt(mydata,id.vars=c("ID"))  ##id.vars保证ID列不会被merge,会保留完整。
mytheme<- theme(plot.title=element_text(face="bold.italic",family="Times",size=12))+
  theme(axis.title = element_text(size=9))+
  theme(legend.title = element_text(size=9))+
  theme(axis.text.x = element_text(face = "bold",size=8))+
  theme(axis.text.y = element_text(face = "italic",colour = "black",size=7))
p <- ggplot(data1,aes(x=variable,y=ID))+
     geom_tile(aes(fill=value),color="white") +
     scale_fill_gradient(low = "white",high ="red") +
     labs(title="R2-05",x="",y="miRNA ID",fill="label") + 
   mytheme
p
附件