服务热线
178 0020 3020
library(reshape2) library(scales) library(plyr) library(ggplot2) data<-read.table("2.csv",sep=",",header=T) data2<-melt(data,id.vars=c("ID")) data3<-ddply(data2,.(variable), transform,label=rescale(value)) ggplot(data3, aes(x=variable,y=ID))+geom_tile(aes(fill=label))+scale_fill_gradient(low = "yellow", high = "red")+xlab("Groups") + ggtitle("R2-01")+geom_text(aes(label=round(label,2)),size=4)
附件