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,

  1. how remove green line in y , x-axis? not sure why there. (solved)
  2. how change legend box dot of color?
  3. 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'.

enter image description here


Comments

Popular posts from this blog

android - Get AccessToken using signpost OAuth without opening a browser (Two legged Oauth) -

org.mockito.exceptions.misusing.InvalidUseOfMatchersException: mockito -

google shop client API returns 400 bad request error while adding an item -