I'm studying R in university at the moment and I'm following my professor's R cheatsheet and codes to replicate using my own database.
But when I wanna replicate this following code, it loads, but uncolored... while the plot it's supposed to be filled with a variety of colors
This is the code I need to replicate:
ggplot(diamonds) + geom_histogram(bins = 50, aes(x = carat, fill = cut)) + xlab("Carat") + ylab("Frecuencia") + ggtitle("Distribución de la variable Carat") + theme_minimal()
This is the outcome of the previous code:
And this is my version:
ggplot(baseDeDatos2) + geom_histogram(bins = 50, aes(x = EDAD, fill = ALTURA)) + xlab("EDAD") + ylab("Frecuencia") + ggtitle("Distribución de la variable EDAD") + theme_minimal()
And my outcome is uncolored: I can't post more than 1 photo since I'm a new user... but my outcome is the plot in gray colors.
Could someone tell me why is my outcome uncolored..? Thank you