ggdatalab logo

ggdatalab

ggdatalab is a small ggplot2 extension that provides:

The package is written to be R CMD check clean and suitable for CRAN submission.


Installation

CRAN

When available on CRAN:

install.packages("ggdatalab")

Development version (GitHub)

install.packages("remotes")
remotes::install_github("kubdatalab/ggdatalab", build_vignettes = TRUE)

Quick start

library(ggplot2)
library(ggdatalab)

ggplot(mtcars, aes(wt, mpg, colour = hp)) +
  geom_point(size = 3) +
  scale_colour_datalab_c() +
  theme_datalab()

What’s included

Theme

A minimal theme based on theme_minimal() with restrained grid lines and sensible typography defaults.

Discrete colour scales

Continuous colour scales

Palette helpers


Vignette

vignette("using-ggdatalab")

Or:

browseVignettes("ggdatalab")

Contributing

Issues and pull requests are welcome. Please include a minimal reproducible example when reporting bugs.


License

MIT © KUB Datalab