Remove ‘a’ from legend when using aesthetics and geom_text

Set show.legend = FALSE in geom_text: ggplot(data = iris, aes(x = Sepal.Length, y = Sepal.Width, colour = Species, shape = Species, label = Species)) + geom_point() + geom_text(show.legend = FALSE) The argument show_guide changed name to show.legend in ggplot2 2.0.0 (see release news). Pre-ggplot2 2.0.0: With show_guide = FALSE like so… ggplot(data = iris, aes(x … Read more

Add legend to ggplot2 line plot

Since @Etienne asked how to do this without melting the data (which in general is the preferred method, but I recognize there may be some cases where that is not possible), I present the following alternative. Start with a subset of the original data: datos <- structure(list(fecha = structure(c(1317452400, 1317538800, 1317625200, 1317711600, 1317798000, 1317884400, 1317970800, … Read more