r - How can I change the legend of this figure? -
i using code produce picture:
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))
now,
how remove green line in y , x-axis? not sure why there.(solved)- how change legend box dot of color?
how can make bottom of figure start y=0 instead of empty space there?(solved)
thank you.
p.s. not able use melt dataframes because of different lengths same name 'fd'.
Comments
Post a Comment