Guest User

Untitled

a guest
Jun 18th, 2018
76
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.63 KB | None | 0 0
  1. #### Code for making ketupat
  2. #### By Kevin Soo
  3.  
  4. library(tidyverse)
  5. data <- tibble(
  6. x = c(2, 3, 3, 4, 4, 4, 5, 5, 6) + 1,
  7. y = c(3, 4, 2, 5, 3, 1, 4, 2, 3) + 2,
  8. z = as.factor(c(1, 2, 2, 1, 1, 1, 2, 2, 1))
  9. )
  10.  
  11. data %>%
  12. ggplot(aes(x = x, y = y)) +
  13. geom_point(shape = 23, size = 18, aes(fill = z)) +
  14. scale_x_continuous(limits = c(0, 10)) +
  15. scale_y_continuous(limits = c(0, 10)) +
  16. scale_fill_manual(values = c("darkolivegreen2", "khaki1")) +
  17. guides(fill = FALSE) +
  18. theme_minimal() +
  19. labs(title = "Selamat Hari Raya from DataTarik",
  20. subtitle = "Maaf zahir dan batin",
  21. x = "X",
  22. y = "Y")
Add Comment
Please, Sign In to add comment