two histograms in one plot (ggplot)

Viewed 18104

Well, I've been looking in this site to make two histograms in one plot. I get to

ggplot()+geom_histogram(data=etapa1, aes(x=AverageTemperature),col="red")+
geom_histogram(data=etapa2, aes(x=AverageTemperature),col="blue")

I've got two histograms with different colours, but I don't get a legend or a label which shows which is each colour. How can I produce it?

2 Answers
Related