Created
February 26, 2020 03:37
-
-
Save MCMaurer/75a854c2156f89949010de439317fcaf 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
library(tidyverse) | |
#devtools::install_github("AckerDWM/gg3D") | |
library("gg3D") | |
flights <- nycflights13::flights | |
flights %>% | |
drop_na() %>% | |
filter(dest %in% c("LAX", "SFO", "SMF")) %>% | |
ggplot(aes(x = hour, y = dep_delay, z = arr_delay, color = month, shape = origin)) + | |
axes_3D(theta = 280, phi = 20) + | |
stat_3D(size = 4, alpha = 0.2, theta = 280, phi = 20) + | |
stat_3D(geom = "path", theta = 280, phi = 20) + | |
facet_grid(rows = vars(origin), cols = vars(dest)) + | |
scale_color_gradient2(low = "#03fcf0", mid = "#ffff00", high = "#5c472a") + | |
theme(text = element_text(family = "Wingdings", size = 20, color = "magenta", face = "bold"), | |
aspect.ratio = 0.8, | |
panel.background = element_rect(fill = "#00f2ff"), | |
plot.background = element_rect(fill = "#5eff00"), | |
strip.background = element_rect(fill = "#ff4800"), | |
axis.text.x = element_text(colour = "#ff0088"), | |
axis.text.y = element_text(colour = "#fbff00"), | |
legend.box.background = element_rect(fill = "#00ff7b"), | |
legend.background = element_rect(fill = "#ff0000"), | |
panel.grid.major = element_line(color = "#825d96", size = 3, | |
linetype = "dashed", lineend = "butt"), | |
panel.grid.minor = element_line(colour = "#0000ff", linetype = "dotted", | |
lineend = "butt", size = 2)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment