title: Why ggplot2 legend not show in the graph
body: <p>I use ggplot to scatterplot 2 datasets and want to show the legend in the top left. I tried some code but didn't work. I am not sure why this happened.</p>
  
  <pre><code>ggplot(mf, aes(log10(mf[,2]),mf[,1])) 
  + ggtitle("Plot") 
  + geom_point(color = "blue") +  theme(plot.margin = unit(c(1,2,1,1), "cm"))
  + xlab("xxx") + ylab("yyy") 
  + theme(plot.title = element_text(size=18,hjust = 0.5, vjust=4)) 
  + geom_point(data=mf2,aes(log10(mf2[,2]),mf2[,1]),color="red") 
  + theme(axis.title.x = element_text(size = rel(1.3))) 
  + theme(axis.title.y = element_text(size = rel(1.3))) 
  + scale_color_discrete(name = "Dataset",labels = c("Dataset 1", "Dataset 2"))
  </code></pre>
  
  <p><a href="https://i.stack.imgur.com/wl09M.png" rel="noreferrer"><img src="https://i.stack.imgur.com/wl09M.png" alt="enter image description here"></a></p>