library(tidyverse) library(ggplot2) temp <- tibble(x = rep(0, 14), y = rep(0, 14), value = rep(0, 14), size = rep(0, 14), tb = "") size = seq(0.20, 1, by = 0.20) size chevron <- temp for(i in seq_len(length(size))){ x1 <- -seq(size[i], size[i] / 3, by = -size[i] / 3) y1 <- size[i] + x1 x2 <- seq(0, size[i], by = size[i] / 3) y2 <- size[i] - x2 x3 <- seq(size[i], 0, by = -size[i] / 3) y3 <- -(- x3 + size[i]) x4 <- -seq(size[i] / 3, size[i], by = size[i] / 3) y4 <- -(x4 + size[i]) x <- c(x1, x2, x3, x4) y <- c(y1, y2, y3, y4) temp$x <- x temp$y <- y temp$size = size[i] temp$tb <- c(rep("top", 7), rep("bot", 7)) chevron <- rbind(chevron, temp) } chevron <- filter(chevron, size > 0) chevron_top <- filter(chevron, tb == "top") chevron_bot <- filter(chevron, tb == "bot") linewidth1 <- 2 size1 <- 2 shape1 <- 15 ggplot() + geom_line(data = chevron_top, aes(x = x, y = y, group = size, color = size), linewidth = linewidth1) + geom_line(data = chevron_bot, aes(x = x, y = y, group = size, color = size), linewidth = linewidth1)+ geom_point(data = chevron_top, aes(x = x, y = y, group = size, color = size), size = size1, shape = shape1) + geom_point(data = chevron_bot, aes(x = x, y = y, group = size, color = size), size = size1, shape = shape1) + geom_line(data = chevron_top, aes(x = x, y = y + 2, group = size, color = size), linewidth = linewidth1) + geom_line(data = chevron_bot, aes(x = x, y = y + 2, group = size, color = size), linewidth = linewidth1) + geom_point(data = chevron_top, aes(x = x, y = y + 2, group = size, color = size), size = size1, shape = shape1) + geom_point(data = chevron_bot, aes(x = x, y = y + 2, group = size, color = size), size = size1, shape = shape1) + geom_line(data = chevron_top, aes(x = x, y = y + 4, group = size, color = size), linewidth = linewidth1) + geom_line(data = chevron_bot, aes(x = x, y = y + 4, group = size, color = size), linewidth = linewidth1) + geom_point(data = chevron_top, aes(x = x, y = y + 4, group = size, color = size), size = size1, shape = shape1) + geom_point(data = chevron_bot, aes(x = x, y = y + 4, group = size, color = size), size = size1, shape = shape1) + geom_line(data = chevron_top, aes(x = x, y = y + 6, group = size, color = size), linewidth = linewidth1) + geom_line(data = chevron_bot, aes(x = x, y = y + 6, group = size, color = size), linewidth = linewidth1) + geom_point(data = chevron_top, aes(x = x, y = y + 6, group = size, color = size), size = size1, shape = shape1) + geom_point(data = chevron_bot, aes(x = x, y = y + 6, group = size, color = size), size = size1, shape = shape1) + geom_line(data = chevron_top, aes(x = x, y = y + 8, group = size, color = size), linewidth = linewidth1) + geom_line(data = chevron_bot, aes(x = x, y = y + 8, group = size, color = size), linewidth = linewidth1) + geom_point(data = chevron_top, aes(x = x, y = y + 8, group = size, color = size), size = size1, shape = shape1) + geom_point(data = chevron_bot, aes(x = x, y = y + 8, group = size, color = size), size = size1, shape = shape1) + geom_line(data = chevron_top, aes(x = x, y = y + 10, group = size, color = size), linewidth = linewidth1) + geom_line(data = chevron_bot, aes(x = x, y = y + 10, group = size, color = size), linewidth = linewidth1) + geom_point(data = chevron_top, aes(x = x, y = y + 10, group = size, color = size), size = size1, shape = shape1) + geom_point(data = chevron_bot, aes(x = x, y = y + 10, group = size, color = size), size = size1, shape = shape1) + geom_line(data = chevron_top, aes(x = x, y = y + 12, group = size, color = size), linewidth = linewidth1) + geom_line(data = chevron_bot, aes(x = x, y = y + 12, group = size, color = size), linewidth = linewidth1) + geom_point(data = chevron_top, aes(x = x, y = y + 12, group = size, color = size), size = size1, shape = shape1) + geom_point(data = chevron_bot, aes(x = x, y = y + 12, group = size, color = size), size = size1, shape = shape1) + geom_line(data = chevron_top, aes(x = x, y = y + 14, group = size, color = size), linewidth = linewidth1) + geom_line(data = chevron_bot, aes(x = x, y = y + 14, group = size, color = size), linewidth = linewidth1) + geom_point(data = chevron_top, aes(x = x, y = y + 14, group = size, color = size), size = size1, shape = shape1) + geom_point(data = chevron_bot, aes(x = x, y = y + 14, group = size, color = size), size = size1, shape = shape1) + geom_line(data = chevron_top, aes(x = x, y = y + 16, group = size, color = size), linewidth = linewidth1) + geom_line(data = chevron_bot, aes(x = x, y = y + 16, group = size, color = size), linewidth = linewidth1) + geom_point(data = chevron_top, aes(x = x, y = y + 16, group = size, color = size), size = size1, shape = shape1) + geom_point(data = chevron_bot, aes(x = x, y = y + 16, group = size, color = size), size = size1, shape = shape1) + geom_line(data = chevron_top, aes(x = x, y = y + 18, group = size, color = size), linewidth = linewidth1) + geom_line(data = chevron_bot, aes(x = x, y = y + 18, group = size, color = size), linewidth = linewidth1) + geom_point(data = chevron_top, aes(x = x, y = y + 18, group = size, color = size), size = size1, shape = shape1) + geom_point(data = chevron_bot, aes(x = x, y = y + 18, group = size, color = size), size = size1, shape = shape1) + geom_line(data = chevron_top, aes(x = x, y = y + 20, group = size, color = size), linewidth = linewidth1) + geom_line(data = chevron_bot, aes(x = x, y = y + 20, group = size, color = size), linewidth = linewidth1) + geom_point(data = chevron_top, aes(x = x, y = y + 20, group = size, color = size), size = size1, shape = shape1) + geom_point(data = chevron_bot, aes(x = x, y = y + 20, group = size, color = size), size = size1, shape = shape1) + geom_line(data = chevron_top, aes(x = x, y = y + 22, group = size, color = size), linewidth = linewidth1) + geom_line(data = chevron_bot, aes(x = x, y = y + 22, group = size, color = size), linewidth = linewidth1) + geom_point(data = chevron_top, aes(x = x, y = y + 22, group = size, color = size), size = size1, shape = shape1) + geom_point(data = chevron_bot, aes(x = x, y = y + 22, group = size, color = size), size = size1, shape = shape1) + geom_line(data = chevron_top, aes(x = x, y = y + 24, group = size, color = size), linewidth = linewidth1) + geom_line(data = chevron_bot, aes(x = x, y = y + 24, group = size, color = size), linewidth = linewidth1) + geom_point(data = chevron_top, aes(x = x, y = y + 24, group = size, color = size), size = size1, shape = shape1) + geom_point(data = chevron_bot, aes(x = x, y = y + 24, group = size, color = size), size = size1, shape = shape1) + geom_line(data = chevron_top, aes(x = x, y = y + 26, group = size, color = size), linewidth = linewidth1) + geom_line(data = chevron_bot, aes(x = x, y = y + 26, group = size, color = size), linewidth = linewidth1) + geom_point(data = chevron_top, aes(x = x, y = y + 26, group = size, color = size), size = size1, shape = shape1) + geom_point(data = chevron_bot, aes(x = x, y = y + 26, group = size, color = size), size = size1, shape = shape1) + geom_line(data = chevron_top, aes(x = x, y = y + 28, group = size, color = size), linewidth = linewidth1) + geom_line(data = chevron_bot, aes(x = x, y = y + 28, group = size, color = size), linewidth = linewidth1) + geom_point(data = chevron_top, aes(x = x, y = y + 28, group = size, color = size), size = size1, shape = shape1) + geom_point(data = chevron_bot, aes(x = x, y = y + 28, group = size, color = size), size = size1, shape = shape1) + geom_line(data = chevron_top, aes(x = x, y = y + 30, group = size, color = size), linewidth = linewidth1) + geom_line(data = chevron_bot, aes(x = x, y = y + 30, group = size, color = size), linewidth = linewidth1) + geom_point(data = chevron_top, aes(x = x, y = y + 30, group = size, color = size), size = size1, shape = shape1) + geom_point(data = chevron_bot, aes(x = x, y = y + 30, group = size, color = size), size = size1, shape = shape1) + geom_line(data = chevron_top, aes(x = x, y = y + 32, group = size, color = size), linewidth = linewidth1) + geom_line(data = chevron_bot, aes(x = x, y = y + 32, group = size, color = size), linewidth = linewidth1) + geom_point(data = chevron_top, aes(x = x, y = y + 32, group = size, color = size), size = size1, shape = shape1) + geom_point(data = chevron_bot, aes(x = x, y = y + 32, group = size, color = size), size = size1, shape = shape1) + geom_line(data = chevron_top, aes(x = x, y = y + 34, group = size, color = size), linewidth = linewidth1) + geom_line(data = chevron_bot, aes(x = x, y = y + 34, group = size, color = size), linewidth = linewidth1) + geom_point(data = chevron_top, aes(x = x, y = y + 34, group = size, color = size), size = size1, shape = shape1) + geom_point(data = chevron_bot, aes(x = x, y = y + 34, group = size, color = size), size = size1, shape = shape1) + geom_line(data = chevron_top, aes(x = x, y = y + 36, group = size, color = size), linewidth = linewidth1) + geom_line(data = chevron_bot, aes(x = x, y = y + 36, group = size, color = size), linewidth = linewidth1) + geom_point(data = chevron_top, aes(x = x, y = y + 36, group = size, color = size), size = size1, shape = shape1) + geom_point(data = chevron_bot, aes(x = x, y = y + 36, group = size, color = size), size = size1, shape = shape1) + geom_line(data = chevron_top, aes(x = x, y = y + 38, group = size, color = size), linewidth = linewidth1) + geom_line(data = chevron_bot, aes(x = x, y = y + 38, group = size, color = size), linewidth = linewidth1) + geom_point(data = chevron_top, aes(x = x, y = y + 38, group = size, color = size), size = size1, shape = shape1) + geom_point(data = chevron_bot, aes(x = x, y = y + 38, group = size, color = size), size = size1, shape = shape1) + theme_bw() + theme(axis.title = element_blank(), axis.ticks = element_blank(), axis.text = element_blank(), panel.grid = element_blank(), panel.border = element_blank(), legend.position = "none") + coord_cartesian(xlim = c(-1.10, 1.10), ylim = c(-1.10, 39.10)) + scale_colour_gradientn(colors = c("white","#898D8D","#003087"), space = "Lab", na.value = "grey50", guide = "colourbar", aesthetics = "colour") #getwd() #setwd("/path/to/save/location") ggsave("border_summer_2023.png", width = 0.5, height = 20, units = "in")