Question

Para o gráfico anterior, adicione os seguintes elementos textuais e gráficos:

Solution

require(ggplot2)

N <- 100
vec <- rnorm(N)
df <- dplyr::tibble(
  y = vec,
  x = 1:N
  )

p <- ggplot(df, aes(x = x, y = y)) + 
  geom_point() + 
  labs(title = "TÍTULO",
       subtitle = "SUBTÍTULO",
       caption = stringr::str_glue("Compilado em {Sys.time()}"),
       x = "texto X",
       y = "texto Y") + 
  theme_light()

p

Meta-information

extype: string exsolution: r mchoice2string(c(TRUE, FALSE, FALSE, FALSE, FALSE), single = TRUE) exname: "ggplot 2" exshuffle: TRUE



msperlin/vdr documentation built on Nov. 25, 2022, 2:29 a.m.