The goal of plot3 is to generating ggplot2
plots with less code. While
ggplot2
focusses on adding functions to create advanced plots
(leading to a lot of repetitive code), plot3
focusses on only adding
arguments
to create advanced plots.
In short, plot3
provides:
ggplot2
functions, losing the
need to write functions such as ggplot()
, geom_col()
,
facet_wrap()
, labs()
, etc. over and over againplot()
callsx
(the regular x axis),
category
(replaces ‘fill’ and ‘colour’) and facet
x.sort
, category.sort
and facet.sort
x
by setting x.max_items
You can install the released version of plot3 from CRAN with:
install.packages("plot3")
And the development version from GitHub with:
# install.packages("remotes")
remotes::install_github("msberends/plot3")
This is a basic example which shows you how to solve a common problem:
library(plot3)
#> Loading required package: ggplot2
## basic example code
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.