# Creating scale for ggplot2 graph using default arguments
library(ggplot2)
fig_raw <- ggplot() +
geom_col(data = mtcars, aes(x = hp , y = mpg, fill = cyl)) +
scale_fill_ipea()
# Creating scale for ggplot2 graph using green sequential palette
fig_raw <- ggplot() +
geom_col(data = mtcars, aes(x = hp , y = mpg, fill = cyl)) +
scale_fill_ipea(palette = "Green")
Run the code above in your browser using DataLab