No description
  • R 99.4%
  • Rez 0.6%
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
2026-10-12 11:10:04 +02:00
man Minor fixes in man pages 2026-10-12 11:10:04 +02:00
R Minor fixes in man pages 2026-10-12 11:10:04 +02:00
tests realease version 0.0.0.1000 2026-10-11 13:22:25 +02:00
vignettes Releasing version 1.0.0 2026-10-12 10:29:23 +02:00
.gitignore Releasing version 1.0.0 2026-10-12 10:29:23 +02:00
.Rbuildignore Releasing version 1.0.0 2026-10-12 10:29:23 +02:00
DESCRIPTION Increment version number to 1.0.0 2026-10-12 10:14:43 +02:00
LICENSE realease version 0.0.0.1000 2026-10-11 13:22:25 +02:00
LICENSE.md realease version 0.0.0.1000 2026-10-11 13:22:25 +02:00
NAMESPACE Releasing version 1.0.0 2026-10-12 10:29:23 +02:00
NEWS.md Releasing version 1.0.0 2026-10-12 10:29:23 +02:00
nordtheme.Rproj realease version 0.0.0.1000 2026-10-11 13:22:25 +02:00
README.md Releasing version 1.0.0 2026-10-12 10:29:23 +02:00
README.Rmd Releasing version 1.0.0 2026-10-12 10:29:23 +02:00

nordtheme

nordtheme is an implementation of Nord Theme for ggplot2.

Installation

You can install nordtheme like so:

pak::pak("git::https://git.nikolaydudaev.com/ndudaev/nordtheme.git")

or like so

remotes::install_git("https://git.nikolaydudaev.com/ndudaev/nordtheme.git")

Examples

Dark Mode

Dark mode looks like this with discrete colours:

library(ggplot2)
library(nordtheme)
# Discrete colours: scatter by group
ggplot(mpg, aes(displ, hwy, colour = class)) +
    geom_point(size = 2.2, alpha = 0.9) +
    scale_colour_nord_d() +
    labs(title = "Engine size vs. highway mileage",
         subtitle = "Discrete 'mixed' palette: Frost and Aurora interleaved",
         x = "Displacement (L)", y = "Highway MPG", colour = NULL,
         caption = "Data: ggplot2::mpg") +
    theme_nord("dark")

…and continuous fill might look like this:

# Continuous sequential fill
ggplot(faithfuld, aes(waiting, eruptions, fill = density)) +
    geom_raster() +
    scale_fill_nord_c("dark") +
    coord_cartesian(expand = FALSE) +
    labs(title = "Old Faithful eruptions",
         subtitle = "Sequential scale: low density fades into the background") +
    theme_nord("dark")

Light Mode

And light mode looks like this when using facets:

 # Unmapped geoms + facets: tests default ink (ggplot2 >= 4.0) and strips
ggplot(mpg, aes(hwy)) +
    geom_histogram(binwidth = 2, fill = nord[["nord9"]]) +
    facet_wrap(~drv) +
    labs(title = "Highway MPG by drivetrain", x = "Highway MPG", y = "Count") +
    theme_nord("light")

This is an example with semantic colors:

  # Semantic status colours
  status <- data.frame(
    day   = rep(1:7, each = 3),
    level = factor(rep(c("ok", "warning", "error"), 7),
                   levels = c("ok", "warning", "error")),
    n     = c(120, 14, 3, 132, 9, 1, 110, 22, 6, 128, 11, 2,
              140, 7, 0, 98, 30, 9, 125, 12, 2)
  )
ggplot(status, aes(day, n, fill = level)) +
    geom_col(width = 0.7) +
    scale_fill_nord_status() +
    labs(title = "Events per day by severity",
         subtitle = "Semantic scale from Nord's own state colours",
         x = "Day", y = "Events", fill = NULL) +
    theme_nord("light")