Skip to content

NIFU-farger og -tema for R

License

GPL-3.0, GPL-3.0 licenses found

Licenses found

GPL-3.0
LICENSE
GPL-3.0
LICENSE.md
Notifications You must be signed in to change notification settings

NIFU-NO/nifutheme

Repository files navigation

nifutheme

Color palettes and ggplot2-integrated color scale functions based on NIFU colors.

Installation

Install nifutheme directly from GitHub like this:

# install.packages(remotes)  ## Run this command if you do not have the remotes package installed already

remotes::install_git("https://github.com/NIFU-NO/nifutheme")

Usage

Currently, nifutheme makes available two functions that can be used in ggplot2-plotting. Here is the color aesthetic:

# Required libraries
library(ggplot2)
library(nifutheme)

iris |> 
  ggplot(aes(x = Sepal.Length,
             y = Sepal.Width,
             color = Species)) +
  geom_point(size = 3.5) +
  scale_color_nifu() +
  theme_minimal()

And here is the fill aesthetic. Note the arguments that specify non-discrete data and a color specification:

faithfuld |> 
  ggplot(aes(x = waiting,
             y = eruptions,
             fill = density)) +
  geom_tile() +
  scale_fill_nifu(discrete = FALSE,
                  palette = "reds") +
  theme_minimal()

Here is the fill aesthetic in the blue hues:

faithfuld |> 
  ggplot(aes(x = waiting,
             y = eruptions,
             fill = density)) +
  geom_tile() +
  scale_fill_nifu(discrete = FALSE,
                  palette = "blues") +
  theme_minimal()

Palettes are reversible:

faithfuld |> 
  ggplot(aes(x = waiting,
             y = eruptions,
             fill = density)) +
  geom_tile() +
  scale_fill_nifu(discrete = FALSE,
                  palette = "blues",
                  reverse = TRUE) +
  theme_minimal()

About

NIFU-farger og -tema for R

Resources

License

GPL-3.0, GPL-3.0 licenses found

Licenses found

GPL-3.0
LICENSE
GPL-3.0
LICENSE.md

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 3

  •  
  •  
  •