Created
October 20, 2017 05:33
-
-
Save jimmylovestea/9e7e98fa53c1eaa3bf8a20640010b0b2 to your computer and use it in GitHub Desktop.
This file contains 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
## In response to: https://twitter.com/ewijaya_/status/921178681069809664 | |
# Load ggplot2 | |
library(ggplot2) | |
# Start by creating a data frame similar to that found in the plot | |
x = LETTERS[1:4] | |
y = letters[1:8] | |
df <- expand.grid(x, y) | |
names(df) <- c("x", "y") | |
df$w = runif(nrow(df)) | |
df$z = sample(c(letters[10:14]), size = nrow(df), replace = TRUE) | |
# Make the plot | |
ggplot(df) + | |
geom_point(aes(x = x, y = y, color = z, size = w)) + | |
theme_minimal() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment