Hello,
I cannot turn off showing useless legend in the following example:
ggplot(mtcars) +
geom_histogram(aes(wt,..density.., col="red", show.legend=FALSE))+
theme_minimal()
However, I've found it does work in the code below:
ggplot(mtcars) +
geom_histogram(aes(wt,..density.., col="red"))+
theme_minimal()+
theme(legend.position="none")
Is there some kind of a coding error in the first example?