Skip to content

KUBDatalab/ggdatalab

Repository files navigation

ggdatalab logo

R-CMD-check pkgdown Lifecycle: experimental

ggdatalab

ggdatalab is a small ggplot2 extension that provides:

  • a consistent theme (theme_datalab())
  • discrete and continuous colour scales built from a fixed palette
  • simple palette helpers for reuse outside ggplot

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

  • theme_datalab()

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

Discrete colour scales

  • scale_fill_datalab_d()
  • scale_colour_datalab_d()
  • scale_color_datalab_d() (US spelling)

Continuous colour scales

  • scale_fill_datalab_c()
  • scale_colour_datalab_c()
  • scale_color_datalab_c() (US spelling)

Palette helpers

  • datalab_cols()
  • datalab_pal(type = c("discrete", "continuous"))

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

About

No description, website, or topics provided.

Resources

License

Unknown, MIT licenses found

Licenses found

Unknown
LICENSE
MIT
LICENSE.md

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages