A ggplot2-inspired grammar of graphics for interactive visualisations using g2.



Documentation

Installation

# install.packages("remotes")
remotes::install_github("JohnCoene/g2r")

Example

It’s looks similar to ggplot2.

ggplot2

library(ggplot2)

ggplot(iris, aes(Petal.Length, Petal.Width, color = Species)) +
  geom_point() +
  facet_wrap(.~Species)

g2r

library(g2r)

g2(iris, asp(Petal.Length, Petal.Width, color = Species)) %>% 
  fig_point() %>%
  plane_wrap(planes(Species))