Package 'Rdune'

Title: 'Creates Color Palettes Inspired by Dune'
Description: Enables the use of color palettes inspired by the 'Dune' movies. These palettes are compatible with 'ggplot2'. See Wickham (2016) <doi:10.1007/978-3-319-24277-4> for more details on 'ggplot2'.
Authors: Nicholas Vietto [aut, cre, cph]
Maintainer: Nicholas Vietto <[email protected]>
License: MIT + file LICENSE
Version: 1.1.1
Built: 2024-10-28 06:56:31 UTC
Source: CRAN

Help Index


Creates color palettes inspired by 'Dune'

Description

Creates color palettes inspired by 'Dune'

Usage

dune_palette(name, n, type = c("discrete", "continuous"))

Arguments

name

Name of palette. Run names(dune_palettes) to view options.

n

Number of desired colors: If the requested number of colors exceeds the available palette, additional colors will be automatically interpolated. If the number of colors (n) is not specified, the default length of the palette will be used.

type

Specify either "continuous" or "discrete". Use "continuous" if you want to automatically interpolate between colors.

Value

A vector of colors.


Complete list of palettes. Use names(dune_palettes) to return all palette names.

Description

Complete list of palettes. Use names(dune_palettes) to return all palette names.

Usage

dune_palettes

Format

An object of class list of length 15.


Function for printing palette

Description

Function for printing palette

Usage

## S3 method for class 'palette'
print(x, ...)

Arguments

x

Name of palette

...

Other arguments

Value

A vector of colors.

Examples

pal <- dune_palette("atreides")
print.palette(pal)

Dune palettes for plotting with 'ggplot2'

Description

Dune palettes for plotting with 'ggplot2'

Usage

scale_color_dune_c(name, ...)

Arguments

name

Name of palette. Run names(dune_palettes) to view options

...

Other arguments passed on to scale_color_gradientn

Value

An object defining a continuous color scale for use with 'ggplot2'.

Examples

library(ggplot2)
ggplot(data = mtcars, aes(x = mpg, y = disp, color = hp)) +
  geom_point() +
  scale_color_dune_c("atreides3")

Dune palettes for plotting with 'ggplot2'

Description

Dune palettes for plotting with 'ggplot2'

Usage

scale_color_dune_d(name, ...)

Arguments

name

Name of palette. Run names(dune_palettes) to view options

...

Other arguments passed on to discrete_scale

Value

An object defining a discrete color scale for use with 'ggplot2'.

Examples

library(ggplot2)
ggplot(data = mtcars, aes(x = mpg, y = disp, color = factor(cyl))) +
  geom_point() +
  scale_color_dune_d("harkonnen4")

Dune palettes for plotting with 'ggplot2'

Description

Dune palettes for plotting with 'ggplot2'

Usage

scale_fill_dune_c(name, ...)

Arguments

name

Name of palette. Run names(dune_palettes) to view options

...

Other arguments passed on to scale_fill_gradientn

Value

An object defining a continuous fill scale for use with 'ggplot2'.

Examples

library(ggplot2)
ggplot(data = mtcars, aes(x = mpg, y = disp, fill = wt)) +
  geom_point() +
  scale_fill_dune_c("fermen2")

Dune palettes for plotting with 'ggplot2'

Description

Dune palettes for plotting with 'ggplot2'

Usage

scale_fill_dune_d(name, ...)

Arguments

name

Name of palette. Run names(dune_palettes) to view options

...

Other arguments passed on to discrete_scale

Value

An object defining a discrete fill scale for use with 'ggplot2'.

Examples

library(ggplot2)
ggplot(data = mtcars, aes(x = mpg, y = disp, fill = factor(cyl))) +
  geom_point() +
  scale_fill_dune_d("harkonnen4")