Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- library(tidyverse)
- df <- data.frame(x = c(1,2),
- y = c(1,2))
- df %>% ggplot(aes(x, y)) +
- geom_area() + theme(
- panel.grid = element_line(color = "red")
- )
- grd_x <- seq(1, 2, length.out = 9)
- grd_y <- seq(0, 2, length.out = 9)
- df %>% ggplot(aes(x, y)) +
- geom_area() +
- geom_hline(yintercept = grd_y, col = "red") +
- geom_vline(xintercept = grd_x, col = "red")
- library(tidyverse)
- df <- data.frame(x = c(1,2),
- y = c(1,2))
- df %>% ggplot(aes(x, y)) +
- geom_area() +
- theme(panel.grid = element_line(color = "red"),
- panel.ontop = TRUE, panel.background = element_rect(color = NA, fill = NA)
- )
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement