rg2 is a wrapper of G2Plot for R.
You can install rg2 from GitHub:
pak::pkg_install("glfeng318/rg2")
- Wiki (getting started, usage, etc.)
- G2Plot options
This is a basic example which shows you how to render a plot:
library(rg2)
g2_scatter(iris,'Sepal.Length','Sepal.Width',colorField='Species') |>
g2_opt(
legend=list(position='right'),
shape='circle',
size=5
) |>
g2()