R: ggplot background gradient coloring
问题 I would like to generate ggplot’s with gradient coloring, filling both plot panel and its background, as herein shown. As you can see the gradient background coloring encompasses both plot panel and its background. At the moment, only an "approximation" of the required solution is known to me: library(ggplot2) library(grid) library(gridExtra) reds <- c("#7B0664", "#E32219") g <- rasterGrob(reds, width = unit(1, "npc"), height = unit(1, "npc"), interpolate = TRUE) ggplot(data = economics, aes