Type: Package
Title: 'Creates Color Palettes Inspired by Dune'
Version: 1.1.1
Maintainer: Nicholas Vietto <nicholasvietto@gmail.com>
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'.
License: MIT + file LICENSE
Encoding: UTF-8
RoxygenNote: 7.3.1
Imports: ggplot2, graphics, grDevices
Suggests: knitr, rmarkdown, testthat (≥ 3.0.0)
Config/testthat/edition: 3
VignetteBuilder: knitr
URL: https://github.com/nvietto/Rdune, https://nvietto.github.io/Rdune/
BugReports: https://github.com/nvietto/Rdune/issues
NeedsCompilation: no
Packaged: 2024-07-29 21:00:27 UTC; nicholasvietto
Author: Nicholas Vietto [aut, cre, cph]
Repository: CRAN
Date/Publication: 2024-07-29 21:10:10 UTC

Rdune: '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'.

Author(s)

Maintainer: Nicholas Vietto nicholasvietto@gmail.com [copyright holder]

See Also

Useful links:


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")

mirror server hosted at Truenetwork, Russian Federation.