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 |
Creates color palettes inspired by 'Dune'
dune_palette(name, n, type = c("discrete", "continuous"))
dune_palette(name, n, type = c("discrete", "continuous"))
name |
Name of palette. Run |
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. |
A vector of colors.
Complete list of palettes. Use names(dune_palettes) to return all palette names.
dune_palettes
dune_palettes
An object of class list
of length 15.
Function for printing palette
## S3 method for class 'palette' print(x, ...)
## S3 method for class 'palette' print(x, ...)
x |
Name of palette |
... |
Other arguments |
A vector of colors.
pal <- dune_palette("atreides") print.palette(pal)
pal <- dune_palette("atreides") print.palette(pal)
Dune palettes for plotting with 'ggplot2'
scale_color_dune_c(name, ...)
scale_color_dune_c(name, ...)
name |
Name of palette. Run |
... |
Other arguments passed on to |
An object defining a continuous color scale for use with 'ggplot2'.
library(ggplot2) ggplot(data = mtcars, aes(x = mpg, y = disp, color = hp)) + geom_point() + scale_color_dune_c("atreides3")
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'
scale_color_dune_d(name, ...)
scale_color_dune_d(name, ...)
name |
Name of palette. Run |
... |
Other arguments passed on to |
An object defining a discrete color scale for use with 'ggplot2'.
library(ggplot2) ggplot(data = mtcars, aes(x = mpg, y = disp, color = factor(cyl))) + geom_point() + scale_color_dune_d("harkonnen4")
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'
scale_fill_dune_c(name, ...)
scale_fill_dune_c(name, ...)
name |
Name of palette. Run |
... |
Other arguments passed on to |
An object defining a continuous fill scale for use with 'ggplot2'.
library(ggplot2) ggplot(data = mtcars, aes(x = mpg, y = disp, fill = wt)) + geom_point() + scale_fill_dune_c("fermen2")
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'
scale_fill_dune_d(name, ...)
scale_fill_dune_d(name, ...)
name |
Name of palette. Run |
... |
Other arguments passed on to |
An object defining a discrete fill scale for use with 'ggplot2'.
library(ggplot2) ggplot(data = mtcars, aes(x = mpg, y = disp, fill = factor(cyl))) + geom_point() + scale_fill_dune_d("harkonnen4")
library(ggplot2) ggplot(data = mtcars, aes(x = mpg, y = disp, fill = factor(cyl))) + geom_point() + scale_fill_dune_d("harkonnen4")