Skip to content

Instantly share code, notes, and snippets.

@FavioVazquez
Created May 17, 2019 22:07
Show Gist options
  • Save FavioVazquez/780274bbe28a9ccacd81aa30a1f455c1 to your computer and use it in GitHub Desktop.
Save FavioVazquez/780274bbe28a9ccacd81aa30a1f455c1 to your computer and use it in GitHub Desktop.
install.packages("remotes")
remotes::install_github("JohnCoene/g2r")
# So normally this is what you do for getting a plot with ggplot2
library(ggplot2)
ggplot(iris, aes(Petal.Length, Petal.Width, color = Species)) +
geom_point() +
facet_wrap(.~Species)
# Now with g2r
library(g2r)
g2(iris, asp(Petal.Length, Petal.Width, color = Species)) %>%
fig_point() %>%
plane_wrap(planes(Species))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment