|
34 | 34 | #' geom_point(aes(x = Sepal.Length, y = Sepal.Width)) |
35 | 35 | #' |
36 | 36 | #' # Put a silhouette anywhere based on UUID |
37 | | -#' posx <- runif(50, 0, 10) |
38 | | -#' posy <- runif(50, 0, 10) |
39 | | -#' sizey <- runif(50, 0.4, 2) |
40 | | -#' cols <- sample(c("black", "darkorange", "grey42", "white"), 50, |
| 37 | +#' posx <- runif(10, 0, 10) |
| 38 | +#' posy <- runif(10, 0, 10) |
| 39 | +#' sizey <- runif(10, 0.4, 2) |
| 40 | +#' cols <- sample(c("black", "darkorange", "grey42", "white"), 10, |
41 | 41 | #' replace = TRUE) |
42 | 42 | #' |
43 | 43 | #' # Since we are plotting a lot of the same image, we should just save |
44 | 44 | #' # the image in our environment first |
45 | 45 | #' cat <- get_phylopic("23cd6aa4-9587-4a2e-8e26-de42885004c9") |
46 | 46 | #' p <- ggplot(data.frame(cat.x = posx, cat.y = posy), aes(cat.x, cat.y)) |
47 | | -#' for (i in 1:50) { |
| 47 | +#' for (i in 1:10) { |
48 | 48 | #' p <- p + add_phylopic(cat, x = posx[i], y = posy[i], |
49 | 49 | #' ysize = sizey[i], color = cols[i]) |
50 | 50 | #' } |
|
0 commit comments