Created
June 11, 2021 01:32
-
-
Save farach/e9bd8946cc886139efa12a52ab6b9197 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| library(tidyverse) | |
| accenture <- data.frame( | |
| accenture_x1 = c(10, 370, 270, 10), | |
| accenture_y1 = c(10, 140, 180, 95), | |
| accenture_x2 = c(10, 370, 370, 10), | |
| accenture_y2 = c(370, 220, 140, 285) | |
| ) | |
| data.frame( | |
| x = rep(1:380, 380), | |
| y = sample(1:380, 380 * 380, replace = T)) %>% | |
| ggplot() + | |
| geom_bar(aes(x, group = y,fill = y), width = 1, alpha = 0.75) + | |
| # top accenture bar | |
| geom_polygon(aes(x = accenture_x2, y = accenture_y2), data = accenture, alpha = 0.9, | |
| color = "black", fill = "purple") + | |
| # bottom accenture bar | |
| geom_polygon(aes(x = accenture_x1, y = accenture_y1), data = accenture, alpha = 0.6, | |
| color = "black", fill = "purple") + | |
| annotate("text", | |
| x = 180, y = 230, | |
| parse = TRUE, | |
| angle = -22.25, | |
| size = 14, | |
| label = 'atop(bold("KURTOSIS"))', | |
| color = "white" | |
| ) + | |
| annotate("text", | |
| x = 175, y = 115, | |
| parse = TRUE, | |
| angle = 19.5, | |
| size = 8, | |
| label = '"Summer of Fun 2021"', | |
| color = "white" | |
| ) + | |
| scale_fill_gradientn(colours = rainbow(380)) + | |
| theme_void() + | |
| theme( | |
| legend.position = "none" | |
| ) + | |
| coord_equal() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment