我正在使用此代码生成图片:
ggplot() +
stat_density(kernel = "biweight",aes(x=fd, colour='red'), data=dw,position="identity",geom="line") +
stat_density(kernel = "biweight",aes(x=fd, colour='blue'), data=ds,position="identity",geom="line")+
stat_density(kernel = "biweight",aes(x=fd, colour='orange'), data=dmw,position="identity",geom="line")+
stat_density(kernel = "biweight", aes(x=fd, colour='green'), data=dne,position="identity",geom="line")+
scale_colour_manual(name='Regions',values=c('red'='red', 'blue'='blue', 'orange'='orange', 'green'='green'), labels=c('West','South','Midwest','Northeast'))+
scale_y_continuous(expand = c(0,0),limits = c(0,0.025)) +
coord_cartesian(xlim = c(0, 200))
现在,
谢谢。
P.S。无法将MELT用于数据帧,因为它们具有不同的长度,但同名并且#fd'。