Package 'tvthemes'

Title: TV Show Themes and Color Palettes for 'ggplot2' Graphics
Description: Contains various 'ggplot2' themes and color palettes based on TV shows such as 'Game of Thrones', 'Brooklyn Nine-Nine', 'Avatar: The Last Airbender', 'Spongebob Squarepants', and more.
Authors: Ryo Nakagawara [aut, cre]
Maintainer: Ryo Nakagawara <[email protected]>
License: GPL-3
Version: 1.3.3
Built: 2024-11-22 04:37:23 UTC
Source: https://github.com/ryo-n7/tvthemes

Help Index


Attack On Titan palette

Description

Attack On Titan palette

Usage

attackOnTitan_pal(n, type = c("discrete", "continuous"), reverse = FALSE)

scale_color_attackOnTitan(n, type = "discrete", reverse = FALSE, ...)

scale_colour_attackOnTitan(n, type = "discrete", reverse = FALSE, ...)

scale_fill_attackOnTitan(n, type = "discrete", reverse = FALSE, ...)

Arguments

n

number of colors

type

discrete or continuous

reverse

reverse order, Default: FALSE

...

Arguments passed on to ggplot2::discrete_scale

aesthetics

The names of the aesthetics that this scale works with.

scale_name

[Deprecated] The name of the scale that should be used for error messages associated with this scale.

palette

A palette function that when called with a single integer argument (the number of levels in the scale) returns the values that they should take (e.g., scales::pal_hue()).

name

The name of the scale. Used as the axis or legend title. If waiver(), the default, the name of the scale is taken from the first mapping used for that aesthetic. If NULL, the legend title will be omitted.

breaks

One of:

  • NULL for no breaks

  • waiver() for the default breaks (the scale limits)

  • A character vector of breaks

  • A function that takes the limits as input and returns breaks as output. Also accepts rlang lambda function notation.

labels

One of:

  • NULL for no labels

  • waiver() for the default labels computed by the transformation object

  • A character vector giving labels (must be same length as breaks)

  • An expression vector (must be the same length as breaks). See ?plotmath for details.

  • A function that takes the breaks as input and returns labels as output. Also accepts rlang lambda function notation.

limits

One of:

  • NULL to use the default scale values

  • A character vector that defines possible values of the scale and their order

  • A function that accepts the existing (automatic) values and returns new ones. Also accepts rlang lambda function notation.

expand

For position scales, a vector of range expansion constants used to add some padding around the data to ensure that they are placed some distance away from the axes. Use the convenience function expansion() to generate the values for the expand argument. The defaults are to expand the scale by 5% on each side for continuous variables, and by 0.6 units on each side for discrete variables.

na.translate

Unlike continuous scales, discrete scales can easily show missing values, and do so by default. If you want to remove missing values from a discrete scale, specify na.translate = FALSE.

na.value

If na.translate = TRUE, what aesthetic value should the missing values be displayed as? Does not apply to position scales where NA is always placed at the far right.

drop

Should unused factor levels be omitted from the scale? The default, TRUE, uses the levels that appear in the data; FALSE uses all the levels in the factor.

guide

A function used to create a guide or its name. See guides() for more information.

position

For position scales, The position of the axis. left or right for y axes, top or bottom for x axes.

call

The call used to construct the scale for reporting messages.

super

The super class to use for the constructed scale

Examples

library(scales)
show_col(attackOnTitan_pal()(5))

library(ggplot2)
ggplot(airquality, aes(x = Day, y = Temp,
     group = as.factor(Month), color = as.factor(Month))) +
     geom_point(size = 2.5) +
     scale_color_attackOnTitan()

ggplot(airquality, aes(x = Day, y = Temp,
     group = as.factor(Month), color = as.factor(Month))) +
     geom_point(size = 2.5) +
     scale_colour_attackOnTitan()

ggplot(mpg, aes(displ)) +
    geom_histogram(aes(fill = class),
                   col = "black", size = 0.1) +
    scale_fill_attackOnTitan()

Avatar: The Last Airbender palette

Description

Avatar: The Last Airbender palette

Usage

avatar_pal(
  palette = "FireNation",
  n,
  type = c("discrete", "continuous"),
  reverse = FALSE
)

scale_color_avatar(
  palette = "FireNation",
  n,
  type = "discrete",
  reverse = FALSE,
  ...
)

scale_colour_avatar(
  palette = "FireNation",
  n,
  type = "discrete",
  reverse = FALSE,
  ...
)

scale_fill_avatar(
  palette = "FireNation",
  n,
  type = "discrete",
  reverse = FALSE,
  ...
)

Arguments

palette

name of palette (FireNation, EarthKingdom, WaterTribe, AirNomads), Default: "FireNation"

n

number of colors

type

discrete or continuous

reverse

reverse order, Default: FALSE

...

Arguments passed on to ggplot2::discrete_scale

aesthetics

The names of the aesthetics that this scale works with.

scale_name

[Deprecated] The name of the scale that should be used for error messages associated with this scale.

name

The name of the scale. Used as the axis or legend title. If waiver(), the default, the name of the scale is taken from the first mapping used for that aesthetic. If NULL, the legend title will be omitted.

breaks

One of:

  • NULL for no breaks

  • waiver() for the default breaks (the scale limits)

  • A character vector of breaks

  • A function that takes the limits as input and returns breaks as output. Also accepts rlang lambda function notation.

labels

One of:

  • NULL for no labels

  • waiver() for the default labels computed by the transformation object

  • A character vector giving labels (must be same length as breaks)

  • An expression vector (must be the same length as breaks). See ?plotmath for details.

  • A function that takes the breaks as input and returns labels as output. Also accepts rlang lambda function notation.

limits

One of:

  • NULL to use the default scale values

  • A character vector that defines possible values of the scale and their order

  • A function that accepts the existing (automatic) values and returns new ones. Also accepts rlang lambda function notation.

expand

For position scales, a vector of range expansion constants used to add some padding around the data to ensure that they are placed some distance away from the axes. Use the convenience function expansion() to generate the values for the expand argument. The defaults are to expand the scale by 5% on each side for continuous variables, and by 0.6 units on each side for discrete variables.

na.translate

Unlike continuous scales, discrete scales can easily show missing values, and do so by default. If you want to remove missing values from a discrete scale, specify na.translate = FALSE.

na.value

If na.translate = TRUE, what aesthetic value should the missing values be displayed as? Does not apply to position scales where NA is always placed at the far right.

drop

Should unused factor levels be omitted from the scale? The default, TRUE, uses the levels that appear in the data; FALSE uses all the levels in the factor.

guide

A function used to create a guide or its name. See guides() for more information.

position

For position scales, The position of the axis. left or right for y axes, top or bottom for x axes.

call

The call used to construct the scale for reporting messages.

super

The super class to use for the constructed scale

Examples

library(scales)
show_col(avatar_pal()(5))

library(ggplot2)
ggplot(airquality, aes(x = Day, y = Temp,
     group = as.factor(Month), color = as.factor(Month))) +
     geom_point(size = 2.5) +
     scale_color_avatar()

ggplot(airquality, aes(x = Day, y = Temp,
     group = as.factor(Month), color = as.factor(Month))) +
     geom_point(size = 2.5) +
     scale_colour_avatar()

ggplot(mpg, aes(displ)) +
     geom_histogram(aes(fill = class), col = "black", size = 0.1) +
     scale_fill_avatar()

Avatar: The Last Airbender palette (deprecated)

Description

Avatar: The Last Airbender palette

Usage

avatarTLA_pal(
  palette = "FireNation",
  n,
  type = c("discrete", "continuous"),
  reverse = FALSE
)

scale_color_avatarTLA(
  palette = "FireNation",
  n,
  type = "discrete",
  reverse = FALSE,
  ...
)

scale_colour_avatarTLA(
  palette = "FireNation",
  n,
  type = "discrete",
  reverse = FALSE,
  ...
)

scale_fill_avatarTLA(
  palette = "FireNation",
  n,
  type = "discrete",
  reverse = FALSE,
  ...
)

Arguments

palette

name of palette (FireNation, EarthKingdom, WaterTribe, AirNomads), Default: "FireNation"

n

number of colors

type

discrete or continuous

reverse

reverse order, Default: FALSE

...

Arguments passed on to ggplot2::discrete_scale

aesthetics

The names of the aesthetics that this scale works with.

scale_name

[Deprecated] The name of the scale that should be used for error messages associated with this scale.

name

The name of the scale. Used as the axis or legend title. If waiver(), the default, the name of the scale is taken from the first mapping used for that aesthetic. If NULL, the legend title will be omitted.

breaks

One of:

  • NULL for no breaks

  • waiver() for the default breaks (the scale limits)

  • A character vector of breaks

  • A function that takes the limits as input and returns breaks as output. Also accepts rlang lambda function notation.

labels

One of:

  • NULL for no labels

  • waiver() for the default labels computed by the transformation object

  • A character vector giving labels (must be same length as breaks)

  • An expression vector (must be the same length as breaks). See ?plotmath for details.

  • A function that takes the breaks as input and returns labels as output. Also accepts rlang lambda function notation.

limits

One of:

  • NULL to use the default scale values

  • A character vector that defines possible values of the scale and their order

  • A function that accepts the existing (automatic) values and returns new ones. Also accepts rlang lambda function notation.

expand

For position scales, a vector of range expansion constants used to add some padding around the data to ensure that they are placed some distance away from the axes. Use the convenience function expansion() to generate the values for the expand argument. The defaults are to expand the scale by 5% on each side for continuous variables, and by 0.6 units on each side for discrete variables.

na.translate

Unlike continuous scales, discrete scales can easily show missing values, and do so by default. If you want to remove missing values from a discrete scale, specify na.translate = FALSE.

na.value

If na.translate = TRUE, what aesthetic value should the missing values be displayed as? Does not apply to position scales where NA is always placed at the far right.

drop

Should unused factor levels be omitted from the scale? The default, TRUE, uses the levels that appear in the data; FALSE uses all the levels in the factor.

guide

A function used to create a guide or its name. See guides() for more information.

position

For position scales, The position of the axis. left or right for y axes, top or bottom for x axes.

call

The call used to construct the scale for reporting messages.

super

The super class to use for the constructed scale


Big Hero 6 palette

Description

Big Hero 6 palette

Usage

bigHero6_pal(n, type = c("discrete", "continuous"), reverse = FALSE)

scale_color_bigHero6(n, type = "discrete", reverse = FALSE, ...)

scale_colour_bigHero6(n, type = "discrete", reverse = FALSE, ...)

scale_fill_bigHero6(n, type = "discrete", reverse = FALSE, ...)

Arguments

n

number of colors

type

discrete or continuous

reverse

reverse order, Default: FALSE

...

Arguments passed on to ggplot2::discrete_scale

aesthetics

The names of the aesthetics that this scale works with.

scale_name

[Deprecated] The name of the scale that should be used for error messages associated with this scale.

palette

A palette function that when called with a single integer argument (the number of levels in the scale) returns the values that they should take (e.g., scales::pal_hue()).

name

The name of the scale. Used as the axis or legend title. If waiver(), the default, the name of the scale is taken from the first mapping used for that aesthetic. If NULL, the legend title will be omitted.

breaks

One of:

  • NULL for no breaks

  • waiver() for the default breaks (the scale limits)

  • A character vector of breaks

  • A function that takes the limits as input and returns breaks as output. Also accepts rlang lambda function notation.

labels

One of:

  • NULL for no labels

  • waiver() for the default labels computed by the transformation object

  • A character vector giving labels (must be same length as breaks)

  • An expression vector (must be the same length as breaks). See ?plotmath for details.

  • A function that takes the breaks as input and returns labels as output. Also accepts rlang lambda function notation.

limits

One of:

  • NULL to use the default scale values

  • A character vector that defines possible values of the scale and their order

  • A function that accepts the existing (automatic) values and returns new ones. Also accepts rlang lambda function notation.

expand

For position scales, a vector of range expansion constants used to add some padding around the data to ensure that they are placed some distance away from the axes. Use the convenience function expansion() to generate the values for the expand argument. The defaults are to expand the scale by 5% on each side for continuous variables, and by 0.6 units on each side for discrete variables.

na.translate

Unlike continuous scales, discrete scales can easily show missing values, and do so by default. If you want to remove missing values from a discrete scale, specify na.translate = FALSE.

na.value

If na.translate = TRUE, what aesthetic value should the missing values be displayed as? Does not apply to position scales where NA is always placed at the far right.

drop

Should unused factor levels be omitted from the scale? The default, TRUE, uses the levels that appear in the data; FALSE uses all the levels in the factor.

guide

A function used to create a guide or its name. See guides() for more information.

position

For position scales, The position of the axis. left or right for y axes, top or bottom for x axes.

call

The call used to construct the scale for reporting messages.

super

The super class to use for the constructed scale

Examples

library(scales)
show_col(bigHero6_pal()(5))

library(ggplot2)
ggplot(airquality, aes(x = Day, y = Temp,
     group = as.factor(Month), color = as.factor(Month))) +
     geom_point(size = 2.5) +
     scale_color_bigHero6()

ggplot(airquality, aes(x = Day, y = Temp,
     group = as.factor(Month), color = as.factor(Month))) +
     geom_point(size = 2.5) +
     scale_colour_bigHero6()

ggplot(mpg, aes(displ)) +
     geom_histogram(aes(fill = class), col = "black", size = 0.1) +
     scale_fill_bigHero6()

Brooklyn Nine Nine Color and Fill Scales

Description

Brooklyn Nine Nine Color and Fill Scales

Usage

brooklyn99_pal(
  palette = "Regular",
  n = n,
  type = c("discrete", "continuous"),
  reverse = FALSE
)

scale_color_brooklyn99(
  palette = "Regular",
  n = n,
  type = "discrete",
  reverse = FALSE,
  ...
)

scale_colour_brooklyn99(
  palette = "Regular",
  n = n,
  type = "discrete",
  reverse = FALSE,
  ...
)

scale_fill_brooklyn99(
  palette = "Regular",
  n = n,
  type = "discrete",
  reverse = FALSE,
  ...
)

Arguments

palette

name of palette, Regular or Dark Default: "Regular"

n

number of colors

type

discrete or continuous

reverse

reverse order, Default: FALSE

...

Arguments passed on to ggplot2::discrete_scale

aesthetics

The names of the aesthetics that this scale works with.

scale_name

[Deprecated] The name of the scale that should be used for error messages associated with this scale.

name

The name of the scale. Used as the axis or legend title. If waiver(), the default, the name of the scale is taken from the first mapping used for that aesthetic. If NULL, the legend title will be omitted.

breaks

One of:

  • NULL for no breaks

  • waiver() for the default breaks (the scale limits)

  • A character vector of breaks

  • A function that takes the limits as input and returns breaks as output. Also accepts rlang lambda function notation.

labels

One of:

  • NULL for no labels

  • waiver() for the default labels computed by the transformation object

  • A character vector giving labels (must be same length as breaks)

  • An expression vector (must be the same length as breaks). See ?plotmath for details.

  • A function that takes the breaks as input and returns labels as output. Also accepts rlang lambda function notation.

limits

One of:

  • NULL to use the default scale values

  • A character vector that defines possible values of the scale and their order

  • A function that accepts the existing (automatic) values and returns new ones. Also accepts rlang lambda function notation.

expand

For position scales, a vector of range expansion constants used to add some padding around the data to ensure that they are placed some distance away from the axes. Use the convenience function expansion() to generate the values for the expand argument. The defaults are to expand the scale by 5% on each side for continuous variables, and by 0.6 units on each side for discrete variables.

na.translate

Unlike continuous scales, discrete scales can easily show missing values, and do so by default. If you want to remove missing values from a discrete scale, specify na.translate = FALSE.

na.value

If na.translate = TRUE, what aesthetic value should the missing values be displayed as? Does not apply to position scales where NA is always placed at the far right.

drop

Should unused factor levels be omitted from the scale? The default, TRUE, uses the levels that appear in the data; FALSE uses all the levels in the factor.

guide

A function used to create a guide or its name. See guides() for more information.

position

For position scales, The position of the axis. left or right for y axes, top or bottom for x axes.

call

The call used to construct the scale for reporting messages.

super

The super class to use for the constructed scale

Details

Colors that work well with the blue background!

Examples

library(scales)
show_col(brooklyn99_pal()(5))
show_col(brooklyn99_pal(palette = "Dark")(5))

library(ggplot2)
ggplot(airquality, aes(x = Day, y = Temp,
     group = as.factor(Month), color = as.factor(Month))) +
     geom_point(size = 2.5) +
     scale_color_brooklyn99()

ggplot(airquality, aes(x = Day, y = Temp,
     group = as.factor(Month), color = as.factor(Month))) +
     geom_point(size = 2.5) +
     scale_color_brooklyn99(palette = "Dark")

ggplot(airquality, aes(x = Day, y = Temp,
     group = as.factor(Month), color = as.factor(Month))) +
     geom_point(size = 2.5) +
     scale_colour_brooklyn99(palette = "Dark")

ggplot(mpg, aes(displ)) +
     geom_histogram(aes(fill = class), col = "black", size = 0.1) +
     scale_fill_brooklyn99()

Gravity Falls palette

Description

Gravity Falls palette

Usage

gravityFalls_pal(n, type = c("discrete", "continuous"), reverse = FALSE)

scale_color_gravityFalls(n, type = "discrete", reverse = FALSE, ...)

scale_colour_gravityFalls(n, type = "discrete", reverse = FALSE, ...)

scale_fill_gravityFalls(n, type = "discrete", reverse = FALSE, ...)

Arguments

n

number of colors

type

discrete or continuous

reverse

reverse order, Default: FALSE

...

Arguments passed on to ggplot2::discrete_scale

aesthetics

The names of the aesthetics that this scale works with.

scale_name

[Deprecated] The name of the scale that should be used for error messages associated with this scale.

palette

A palette function that when called with a single integer argument (the number of levels in the scale) returns the values that they should take (e.g., scales::pal_hue()).

name

The name of the scale. Used as the axis or legend title. If waiver(), the default, the name of the scale is taken from the first mapping used for that aesthetic. If NULL, the legend title will be omitted.

breaks

One of:

  • NULL for no breaks

  • waiver() for the default breaks (the scale limits)

  • A character vector of breaks

  • A function that takes the limits as input and returns breaks as output. Also accepts rlang lambda function notation.

labels

One of:

  • NULL for no labels

  • waiver() for the default labels computed by the transformation object

  • A character vector giving labels (must be same length as breaks)

  • An expression vector (must be the same length as breaks). See ?plotmath for details.

  • A function that takes the breaks as input and returns labels as output. Also accepts rlang lambda function notation.

limits

One of:

  • NULL to use the default scale values

  • A character vector that defines possible values of the scale and their order

  • A function that accepts the existing (automatic) values and returns new ones. Also accepts rlang lambda function notation.

expand

For position scales, a vector of range expansion constants used to add some padding around the data to ensure that they are placed some distance away from the axes. Use the convenience function expansion() to generate the values for the expand argument. The defaults are to expand the scale by 5% on each side for continuous variables, and by 0.6 units on each side for discrete variables.

na.translate

Unlike continuous scales, discrete scales can easily show missing values, and do so by default. If you want to remove missing values from a discrete scale, specify na.translate = FALSE.

na.value

If na.translate = TRUE, what aesthetic value should the missing values be displayed as? Does not apply to position scales where NA is always placed at the far right.

drop

Should unused factor levels be omitted from the scale? The default, TRUE, uses the levels that appear in the data; FALSE uses all the levels in the factor.

guide

A function used to create a guide or its name. See guides() for more information.

position

For position scales, The position of the axis. left or right for y axes, top or bottom for x axes.

call

The call used to construct the scale for reporting messages.

super

The super class to use for the constructed scale

Examples

library(scales)
show_col(gravityFalls_pal()(5))

library(ggplot2)
ggplot(airquality, aes(x = Day, y = Temp,
     group = as.factor(Month), color = as.factor(Month))) +
     geom_point(size = 3.5) +
     scale_color_gravityFalls()

ggplot(airquality, aes(x = Day, y = Temp,
     group = as.factor(Month), color = as.factor(Month))) +
     geom_point(size = 3.5) +
     scale_colour_gravityFalls()

ggplot(mpg, aes(displ)) +
     geom_histogram(aes(fill = class), col = "black", size = 0.1) +
     scale_fill_gravityFalls()

Hilda palette

Description

Hilda palette

Usage

hilda_pal(
  palette = "Day",
  n,
  type = c("discrete", "continuous"),
  reverse = FALSE
)

scale_color_hilda(palette = "Day", n, type = "discrete", reverse = FALSE, ...)

scale_colour_hilda(palette = "Day", n, type = "discrete", reverse = FALSE, ...)

scale_fill_hilda(palette = "Day", n, type = "discrete", reverse = FALSE, ...)

Arguments

palette

name of palette (Day, Dusk, Night), Default: "Day"

n

number of colors

type

discrete or continuous

reverse

reverse order, Default: FALSE

...

Arguments passed on to ggplot2::discrete_scale

aesthetics

The names of the aesthetics that this scale works with.

scale_name

[Deprecated] The name of the scale that should be used for error messages associated with this scale.

name

The name of the scale. Used as the axis or legend title. If waiver(), the default, the name of the scale is taken from the first mapping used for that aesthetic. If NULL, the legend title will be omitted.

breaks

One of:

  • NULL for no breaks

  • waiver() for the default breaks (the scale limits)

  • A character vector of breaks

  • A function that takes the limits as input and returns breaks as output. Also accepts rlang lambda function notation.

labels

One of:

  • NULL for no labels

  • waiver() for the default labels computed by the transformation object

  • A character vector giving labels (must be same length as breaks)

  • An expression vector (must be the same length as breaks). See ?plotmath for details.

  • A function that takes the breaks as input and returns labels as output. Also accepts rlang lambda function notation.

limits

One of:

  • NULL to use the default scale values

  • A character vector that defines possible values of the scale and their order

  • A function that accepts the existing (automatic) values and returns new ones. Also accepts rlang lambda function notation.

expand

For position scales, a vector of range expansion constants used to add some padding around the data to ensure that they are placed some distance away from the axes. Use the convenience function expansion() to generate the values for the expand argument. The defaults are to expand the scale by 5% on each side for continuous variables, and by 0.6 units on each side for discrete variables.

na.translate

Unlike continuous scales, discrete scales can easily show missing values, and do so by default. If you want to remove missing values from a discrete scale, specify na.translate = FALSE.

na.value

If na.translate = TRUE, what aesthetic value should the missing values be displayed as? Does not apply to position scales where NA is always placed at the far right.

drop

Should unused factor levels be omitted from the scale? The default, TRUE, uses the levels that appear in the data; FALSE uses all the levels in the factor.

guide

A function used to create a guide or its name. See guides() for more information.

position

For position scales, The position of the axis. left or right for y axes, top or bottom for x axes.

call

The call used to construct the scale for reporting messages.

super

The super class to use for the constructed scale

Details

Color set from Matt Shanks & '@ChevyRay'

Examples

library(scales)
show_col(hilda_pal(palette = "Dusk")(5))

library(ggplot2)
ggplot(airquality, aes(x = Day, y = Temp,
     group = as.factor(Month), color = as.factor(Month))) +
     geom_point(size = 2.5) +
     scale_color_hilda(palette = "Day")

ggplot(airquality, aes(x = Day, y = Temp,
     group = as.factor(Month), color = as.factor(Month))) +
     geom_point(size = 2.5) +
     scale_color_hilda(palette = "Night")

ggplot(airquality, aes(x = Day, y = Temp,
     group = as.factor(Month), color = as.factor(Month))) +
     geom_point(size = 2.5) +
     scale_colour_hilda(palette = "Day")

ggplot(mpg, aes(displ)) +
     geom_histogram(aes(fill = class), col = "black", size = 0.1) +
     scale_fill_hilda(palette = "Night")

Import "Slayer" font

Description

The Last Airbender font ("Slayer")

Usage

import_avatar()

Details

Actual font is Herculanum. import_*() functions taken from hrbrthemes. You may still need to install each font on your system directly by finding the .ttf file and clicking "Install".


Import "Gravitation Falls" font

Description

Imports Gravitation Falls font (Gravity Falls)

Usage

import_gravitationFalls()

Details

import_*() functions taken from hrbrthemes. Font made by MaxiGamer on DeviantArt! You may still need to install each font on your system directly by finding the .ttf file and clicking "Install".

See Also

font_import


Import "Get Schwifty" font

Description

Rick & Morty font ("Get Schwifty")

Usage

import_rickAndMorty()

Details

Actual font is ... well, Justin Roiland's actual handwriting. import_*() functions taken from hrbrthemes. Created by jonizaak on DeviantArt! You may still need to install each font on your system directly by finding the .ttf file and clicking "Install".


Import "Akbar" font

Description

The Simpsons Font ("Akbar" font)

Usage

import_simpsons()

Details

import_*() functions taken from hrbrthemes. Created by Jon Bernhardt. You may still need to install each font on your system directly by finding the .ttf file and clicking "Install".

See Also

font_import


Import "Some-Time-Later" font

Description

spongeBob SquarePants font ("Some-Time-Later")

Usage

import_spongeBob()

Details

import_*() functions taken from hrbrthemes. Created by Frederick R. Brennan. You may still need to install each font on your system directly by finding the .ttf file and clicking "Install".


Import "Slayer" font (deprecated)

Description

The Last Airbender font ("Slayer")

Usage

import_theLastAirbender()

Details

Actual font is Herculanum. import_*() functions taken from hrbrthemes. You may still need to install each font on your system directly by finding the .ttf file and clicking "Install".


Kim Possible palette

Description

Kim Possible palette

Usage

kimPossible_pal(n, type = c("discrete", "continuous"), reverse = FALSE)

scale_color_kimPossible(n, type = "discrete", reverse = FALSE, ...)

scale_colour_kimPossible(n, type = "discrete", reverse = FALSE, ...)

scale_fill_kimPossible(n, type = "discrete", reverse = FALSE, ...)

Arguments

n

number of colors

type

discrete or continuous

reverse

reverse order, Default: FALSE

...

Arguments passed on to ggplot2::discrete_scale

aesthetics

The names of the aesthetics that this scale works with.

scale_name

[Deprecated] The name of the scale that should be used for error messages associated with this scale.

palette

A palette function that when called with a single integer argument (the number of levels in the scale) returns the values that they should take (e.g., scales::pal_hue()).

name

The name of the scale. Used as the axis or legend title. If waiver(), the default, the name of the scale is taken from the first mapping used for that aesthetic. If NULL, the legend title will be omitted.

breaks

One of:

  • NULL for no breaks

  • waiver() for the default breaks (the scale limits)

  • A character vector of breaks

  • A function that takes the limits as input and returns breaks as output. Also accepts rlang lambda function notation.

labels

One of:

  • NULL for no labels

  • waiver() for the default labels computed by the transformation object

  • A character vector giving labels (must be same length as breaks)

  • An expression vector (must be the same length as breaks). See ?plotmath for details.

  • A function that takes the breaks as input and returns labels as output. Also accepts rlang lambda function notation.

limits

One of:

  • NULL to use the default scale values

  • A character vector that defines possible values of the scale and their order

  • A function that accepts the existing (automatic) values and returns new ones. Also accepts rlang lambda function notation.

expand

For position scales, a vector of range expansion constants used to add some padding around the data to ensure that they are placed some distance away from the axes. Use the convenience function expansion() to generate the values for the expand argument. The defaults are to expand the scale by 5% on each side for continuous variables, and by 0.6 units on each side for discrete variables.

na.translate

Unlike continuous scales, discrete scales can easily show missing values, and do so by default. If you want to remove missing values from a discrete scale, specify na.translate = FALSE.

na.value

If na.translate = TRUE, what aesthetic value should the missing values be displayed as? Does not apply to position scales where NA is always placed at the far right.

drop

Should unused factor levels be omitted from the scale? The default, TRUE, uses the levels that appear in the data; FALSE uses all the levels in the factor.

guide

A function used to create a guide or its name. See guides() for more information.

position

For position scales, The position of the axis. left or right for y axes, top or bottom for x axes.

call

The call used to construct the scale for reporting messages.

super

The super class to use for the constructed scale

Examples

library(scales)
show_col(kimPossible_pal()(5))

library(ggplot2)
ggplot(airquality, aes(x = Day, y = Temp,
     group = as.factor(Month), color = as.factor(Month))) +
     geom_point(size = 2.5) +
     scale_color_kimPossible()

ggplot(airquality, aes(x = Day, y = Temp,
     group = as.factor(Month), color = as.factor(Month))) +
     geom_point(size = 2.5) +
     scale_colour_kimPossible()

ggplot(mpg, aes(displ)) +
     geom_histogram(aes(fill = class), col = "black", size = 0.1) +
     scale_fill_kimPossible()

Add SpongeBob background

Description

Add SpongeBob background

Usage

paintBikiniBottom(
  plot,
  width = 800,
  height = 500,
  output.file = NULL,
  background = "background",
  ...
)

Arguments

plot

the ggplot object you want to Spongbobify!

width

width, Default: 800

height

height, Default: 500

output.file

File path to save image, Default: NULL

background

"background" or "floral", Default: "background"

...

Other options, see '?magick::image_graph()'

Details

Adapted from ggpomological's 'paint_pomological()' function!

Value

Your plot with a Spongebob themed background!


Parks & Recreation palette

Description

Parks & Recreation palette

Usage

parksAndRec_pal(n, type = c("discrete", "continuous"), reverse = FALSE)

scale_color_parksAndRec(n, type = "discrete", reverse = FALSE, ...)

scale_colour_parksAndRec(n, type = "discrete", reverse = FALSE, ...)

scale_fill_parksAndRec(n, type = "discrete", reverse = FALSE, ...)

Arguments

n

number of colors

type

discrete or continuous

reverse

reverse order, Default: FALSE

...

Arguments passed on to ggplot2::discrete_scale

aesthetics

The names of the aesthetics that this scale works with.

scale_name

[Deprecated] The name of the scale that should be used for error messages associated with this scale.

palette

A palette function that when called with a single integer argument (the number of levels in the scale) returns the values that they should take (e.g., scales::pal_hue()).

name

The name of the scale. Used as the axis or legend title. If waiver(), the default, the name of the scale is taken from the first mapping used for that aesthetic. If NULL, the legend title will be omitted.

breaks

One of:

  • NULL for no breaks

  • waiver() for the default breaks (the scale limits)

  • A character vector of breaks

  • A function that takes the limits as input and returns breaks as output. Also accepts rlang lambda function notation.

labels

One of:

  • NULL for no labels

  • waiver() for the default labels computed by the transformation object

  • A character vector giving labels (must be same length as breaks)

  • An expression vector (must be the same length as breaks). See ?plotmath for details.

  • A function that takes the breaks as input and returns labels as output. Also accepts rlang lambda function notation.

limits

One of:

  • NULL to use the default scale values

  • A character vector that defines possible values of the scale and their order

  • A function that accepts the existing (automatic) values and returns new ones. Also accepts rlang lambda function notation.

expand

For position scales, a vector of range expansion constants used to add some padding around the data to ensure that they are placed some distance away from the axes. Use the convenience function expansion() to generate the values for the expand argument. The defaults are to expand the scale by 5% on each side for continuous variables, and by 0.6 units on each side for discrete variables.

na.translate

Unlike continuous scales, discrete scales can easily show missing values, and do so by default. If you want to remove missing values from a discrete scale, specify na.translate = FALSE.

na.value

If na.translate = TRUE, what aesthetic value should the missing values be displayed as? Does not apply to position scales where NA is always placed at the far right.

drop

Should unused factor levels be omitted from the scale? The default, TRUE, uses the levels that appear in the data; FALSE uses all the levels in the factor.

guide

A function used to create a guide or its name. See guides() for more information.

position

For position scales, The position of the axis. left or right for y axes, top or bottom for x axes.

call

The call used to construct the scale for reporting messages.

super

The super class to use for the constructed scale

Examples

library(scales)
show_col(parksAndRec_pal()(5))

library(ggplot2)
ggplot(airquality, aes(x = Day, y = Temp,
     group = as.factor(Month), color = as.factor(Month))) +
     geom_point(size = 2.5) +
     scale_color_parksAndRec()

ggplot(airquality, aes(x = Day, y = Temp,
     group = as.factor(Month), color = as.factor(Month))) +
     geom_point(size = 2.5) +
     scale_colour_parksAndRec()

ggplot(mpg, aes(displ)) +
     geom_histogram(aes(fill = class), col = "black", size = 0.1) +
     scale_fill_parksAndRec()

Rick & Morty color palette

Description

Rick & Morty color palette

Usage

rickAndMorty_pal(n, type = c("discrete", "continuous"), reverse = FALSE)

scale_color_rickAndMorty(n, type = "discrete", reverse = FALSE, ...)

scale_colour_rickAndMorty(n, type = "discrete", reverse = FALSE, ...)

scale_fill_rickAndMorty(n, type = "discrete", reverse = FALSE, ...)

Arguments

n

number of colors

type

discrete or continuous

reverse

reverse order, Default: FALSE

...

Arguments passed on to ggplot2::discrete_scale

aesthetics

The names of the aesthetics that this scale works with.

scale_name

[Deprecated] The name of the scale that should be used for error messages associated with this scale.

palette

A palette function that when called with a single integer argument (the number of levels in the scale) returns the values that they should take (e.g., scales::pal_hue()).

name

The name of the scale. Used as the axis or legend title. If waiver(), the default, the name of the scale is taken from the first mapping used for that aesthetic. If NULL, the legend title will be omitted.

breaks

One of:

  • NULL for no breaks

  • waiver() for the default breaks (the scale limits)

  • A character vector of breaks

  • A function that takes the limits as input and returns breaks as output. Also accepts rlang lambda function notation.

labels

One of:

  • NULL for no labels

  • waiver() for the default labels computed by the transformation object

  • A character vector giving labels (must be same length as breaks)

  • An expression vector (must be the same length as breaks). See ?plotmath for details.

  • A function that takes the breaks as input and returns labels as output. Also accepts rlang lambda function notation.

limits

One of:

  • NULL to use the default scale values

  • A character vector that defines possible values of the scale and their order

  • A function that accepts the existing (automatic) values and returns new ones. Also accepts rlang lambda function notation.

expand

For position scales, a vector of range expansion constants used to add some padding around the data to ensure that they are placed some distance away from the axes. Use the convenience function expansion() to generate the values for the expand argument. The defaults are to expand the scale by 5% on each side for continuous variables, and by 0.6 units on each side for discrete variables.

na.translate

Unlike continuous scales, discrete scales can easily show missing values, and do so by default. If you want to remove missing values from a discrete scale, specify na.translate = FALSE.

na.value

If na.translate = TRUE, what aesthetic value should the missing values be displayed as? Does not apply to position scales where NA is always placed at the far right.

drop

Should unused factor levels be omitted from the scale? The default, TRUE, uses the levels that appear in the data; FALSE uses all the levels in the factor.

guide

A function used to create a guide or its name. See guides() for more information.

position

For position scales, The position of the axis. left or right for y axes, top or bottom for x axes.

call

The call used to construct the scale for reporting messages.

super

The super class to use for the constructed scale

Examples

library(scales)
show_col(rickAndMorty_pal()(5))

library(ggplot2)
ggplot(airquality, aes(x = Day, y = Temp,
     group = as.factor(Month), color = as.factor(Month))) +
     geom_point(size = 2.5) +
     scale_color_rickAndMorty()

ggplot(airquality, aes(x = Day, y = Temp,
     group = as.factor(Month), color = as.factor(Month))) +
     geom_point(size = 2.5) +
     scale_colour_rickAndMorty()

ggplot(mpg, aes(displ)) +
     geom_histogram(aes(fill = class), col = "black", size = 0.1) +
     scale_fill_rickAndMorty()

The Simpsons palette

Description

The Simpsons palette

Usage

simpsons_pal(n, type = c("discrete", "continuous"), reverse = FALSE)

scale_color_simpsons(n, type = "discrete", reverse = FALSE, ...)

scale_colour_simpsons(n, type = "discrete", reverse = FALSE, ...)

scale_fill_simpsons(n, type = "discrete", reverse = FALSE, ...)

Arguments

n

number of colors

type

discrete or continuous

reverse

reverse order, Default: FALSE

...

Arguments passed on to ggplot2::discrete_scale

aesthetics

The names of the aesthetics that this scale works with.

scale_name

[Deprecated] The name of the scale that should be used for error messages associated with this scale.

palette

A palette function that when called with a single integer argument (the number of levels in the scale) returns the values that they should take (e.g., scales::pal_hue()).

name

The name of the scale. Used as the axis or legend title. If waiver(), the default, the name of the scale is taken from the first mapping used for that aesthetic. If NULL, the legend title will be omitted.

breaks

One of:

  • NULL for no breaks

  • waiver() for the default breaks (the scale limits)

  • A character vector of breaks

  • A function that takes the limits as input and returns breaks as output. Also accepts rlang lambda function notation.

labels

One of:

  • NULL for no labels

  • waiver() for the default labels computed by the transformation object

  • A character vector giving labels (must be same length as breaks)

  • An expression vector (must be the same length as breaks). See ?plotmath for details.

  • A function that takes the breaks as input and returns labels as output. Also accepts rlang lambda function notation.

limits

One of:

  • NULL to use the default scale values

  • A character vector that defines possible values of the scale and their order

  • A function that accepts the existing (automatic) values and returns new ones. Also accepts rlang lambda function notation.

expand

For position scales, a vector of range expansion constants used to add some padding around the data to ensure that they are placed some distance away from the axes. Use the convenience function expansion() to generate the values for the expand argument. The defaults are to expand the scale by 5% on each side for continuous variables, and by 0.6 units on each side for discrete variables.

na.translate

Unlike continuous scales, discrete scales can easily show missing values, and do so by default. If you want to remove missing values from a discrete scale, specify na.translate = FALSE.

na.value

If na.translate = TRUE, what aesthetic value should the missing values be displayed as? Does not apply to position scales where NA is always placed at the far right.

drop

Should unused factor levels be omitted from the scale? The default, TRUE, uses the levels that appear in the data; FALSE uses all the levels in the factor.

guide

A function used to create a guide or its name. See guides() for more information.

position

For position scales, The position of the axis. left or right for y axes, top or bottom for x axes.

call

The call used to construct the scale for reporting messages.

super

The super class to use for the constructed scale

Examples

library(scales)
show_col(simpsons_pal()(5))

library(ggplot2)
ggplot(airquality, aes(x = Day, y = Temp,
     group = as.factor(Month), color = as.factor(Month))) +
     geom_point(size = 2.5) +
     scale_color_simpsons()

ggplot(airquality, aes(x = Day, y = Temp,
     group = as.factor(Month), color = as.factor(Month))) +
     geom_point(size = 2.5) +
     scale_color_simpsons()

ggplot(mpg, aes(displ)) +
     geom_histogram(aes(fill = class), col = "black", size = 0.1) +
     scale_fill_simpsons()

Spongebob Squarepants palette

Description

Spongebob Squarepants palette

Usage

spongeBob_pal(n, type = c("discrete", "continuous"), reverse = FALSE)

scale_color_spongeBob(n, type = "discrete", reverse = FALSE, ...)

scale_colour_spongeBob(n, type = "discrete", reverse = FALSE, ...)

scale_fill_spongeBob(n, type = "discrete", reverse = FALSE, ...)

Arguments

n

number of colors

type

discrete or continuous

reverse

reverse order, Default: FALSE

...

Arguments passed on to ggplot2::discrete_scale

aesthetics

The names of the aesthetics that this scale works with.

scale_name

[Deprecated] The name of the scale that should be used for error messages associated with this scale.

palette

A palette function that when called with a single integer argument (the number of levels in the scale) returns the values that they should take (e.g., scales::pal_hue()).

name

The name of the scale. Used as the axis or legend title. If waiver(), the default, the name of the scale is taken from the first mapping used for that aesthetic. If NULL, the legend title will be omitted.

breaks

One of:

  • NULL for no breaks

  • waiver() for the default breaks (the scale limits)

  • A character vector of breaks

  • A function that takes the limits as input and returns breaks as output. Also accepts rlang lambda function notation.

labels

One of:

  • NULL for no labels

  • waiver() for the default labels computed by the transformation object

  • A character vector giving labels (must be same length as breaks)

  • An expression vector (must be the same length as breaks). See ?plotmath for details.

  • A function that takes the breaks as input and returns labels as output. Also accepts rlang lambda function notation.

limits

One of:

  • NULL to use the default scale values

  • A character vector that defines possible values of the scale and their order

  • A function that accepts the existing (automatic) values and returns new ones. Also accepts rlang lambda function notation.

expand

For position scales, a vector of range expansion constants used to add some padding around the data to ensure that they are placed some distance away from the axes. Use the convenience function expansion() to generate the values for the expand argument. The defaults are to expand the scale by 5% on each side for continuous variables, and by 0.6 units on each side for discrete variables.

na.translate

Unlike continuous scales, discrete scales can easily show missing values, and do so by default. If you want to remove missing values from a discrete scale, specify na.translate = FALSE.

na.value

If na.translate = TRUE, what aesthetic value should the missing values be displayed as? Does not apply to position scales where NA is always placed at the far right.

drop

Should unused factor levels be omitted from the scale? The default, TRUE, uses the levels that appear in the data; FALSE uses all the levels in the factor.

guide

A function used to create a guide or its name. See guides() for more information.

position

For position scales, The position of the axis. left or right for y axes, top or bottom for x axes.

call

The call used to construct the scale for reporting messages.

super

The super class to use for the constructed scale

Examples

library(scales)
show_col(spongeBob_pal()(5))

library(ggplot2)
ggplot(airquality, aes(x = Day, y = Temp,
     group = as.factor(Month), color = as.factor(Month))) +
     geom_point(size = 2.5) +
     scale_color_spongeBob()

ggplot(airquality, aes(x = Day, y = Temp,
     group = as.factor(Month), color = as.factor(Month))) +
     geom_point(size = 2.5) +
     scale_color_spongeBob()

ggplot(mpg, aes(displ)) +
     geom_histogram(aes(fill = class), col = "black", size = 0.1) +
     scale_fill_spongeBob()

Gems & Friends of Steven Universe palette

Description

Steven, Garnet, Amethyst, Pearl, Peridot, Sardonyx, Nephrite, Sugilite, & more!

Usage

stevenUniverse_pal(
  palette = "Steven",
  n,
  type = c("discrete", "continuous"),
  reverse = FALSE
)

scale_color_stevenUniverse(
  palette = "Steven",
  n,
  type = "discrete",
  reverse = FALSE,
  ...
)

scale_colour_stevenUniverse(
  palette = "Steven",
  n,
  type = "discrete",
  reverse = FALSE,
  ...
)

scale_fill_stevenUniverse(
  palette = "Steven",
  n,
  type = "discrete",
  reverse = FALSE,
  ...
)

Arguments

palette

name of palette, Default: "Steven"

n

number of colors

type

discrete or continuous

reverse

reverse order, Default: FALSE

...

Arguments passed on to ggplot2::discrete_scale

aesthetics

The names of the aesthetics that this scale works with.

scale_name

[Deprecated] The name of the scale that should be used for error messages associated with this scale.

name

The name of the scale. Used as the axis or legend title. If waiver(), the default, the name of the scale is taken from the first mapping used for that aesthetic. If NULL, the legend title will be omitted.

breaks

One of:

  • NULL for no breaks

  • waiver() for the default breaks (the scale limits)

  • A character vector of breaks

  • A function that takes the limits as input and returns breaks as output. Also accepts rlang lambda function notation.

labels

One of:

  • NULL for no labels

  • waiver() for the default labels computed by the transformation object

  • A character vector giving labels (must be same length as breaks)

  • An expression vector (must be the same length as breaks). See ?plotmath for details.

  • A function that takes the breaks as input and returns labels as output. Also accepts rlang lambda function notation.

limits

One of:

  • NULL to use the default scale values

  • A character vector that defines possible values of the scale and their order

  • A function that accepts the existing (automatic) values and returns new ones. Also accepts rlang lambda function notation.

expand

For position scales, a vector of range expansion constants used to add some padding around the data to ensure that they are placed some distance away from the axes. Use the convenience function expansion() to generate the values for the expand argument. The defaults are to expand the scale by 5% on each side for continuous variables, and by 0.6 units on each side for discrete variables.

na.translate

Unlike continuous scales, discrete scales can easily show missing values, and do so by default. If you want to remove missing values from a discrete scale, specify na.translate = FALSE.

na.value

If na.translate = TRUE, what aesthetic value should the missing values be displayed as? Does not apply to position scales where NA is always placed at the far right.

drop

Should unused factor levels be omitted from the scale? The default, TRUE, uses the levels that appear in the data; FALSE uses all the levels in the factor.

guide

A function used to create a guide or its name. See guides() for more information.

position

For position scales, The position of the axis. left or right for y axes, top or bottom for x axes.

call

The call used to construct the scale for reporting messages.

super

The super class to use for the constructed scale

Examples

library(scales)
show_col(stevenUniverse_pal(palette = "Steven")(5))
show_col(stevenUniverse_pal(palette = "Pearl")(5))

library(ggplot2)
ggplot(airquality, aes(x = Day, y = Temp,
     group = as.factor(Month), color = as.factor(Month))) +
     geom_point(size = 2.5) +
     scale_color_stevenUniverse(palette = "Steven")

ggplot(airquality, aes(x = Day, y = Temp,
     group = as.factor(Month), color = as.factor(Month))) +
     geom_point(size = 2.5) +
     scale_colour_stevenUniverse(palette = "Peridot")

ggplot(mpg, aes(displ)) +
     geom_histogram(aes(fill = class), col = "black", size = 0.1) +
     scale_fill_stevenUniverse(palette = "LapisLazuli")

Avatar: The Last Airbender theme

Description

Avatar: The Last Airbender theme, Recommended font: "Slayer"

Usage

theme_avatar(
  text.font = NULL,
  title.font = NULL,
  legend.font = NULL,
  title.size = 14,
  text.size = 10,
  subtitle.size = 12,
  axis.title.size = 10,
  axis.text.size = 8,
  legend.title.size = 10,
  legend.text.size = 8,
  title.color = NULL,
  subtitle.color = "grey20",
  text.color = NULL,
  axis.title.color = "grey20",
  axis.text.color = "grey20",
  legend.title.color = "grey20",
  legend.text.color = "grey20",
  legend.position = "bottom",
  ticks = FALSE
)

Arguments

text.font

text font, Default: NULL

title.font

title font, Default: NULL

legend.font

legend font, Default: NULL

title.size

title font size, Default: 14

text.size

text font size, Default: 10

subtitle.size

subtitle font size, Default: 12

axis.title.size

axis title font size, Default: 10

axis.text.size

axis text font size, Default: 8

legend.title.size

legend title font size, Default: 10

legend.text.size

legend text font size, Default: 8

title.color

title color, Default: NULL

subtitle.color

subtitle.color, Default: "grey20"

text.color

text color, Default: NULL

axis.title.color

axis title color, Default: "grey20"

axis.text.color

axis text color, Default: "grey20"

legend.title.color

legend title color, Default: "grey20"

legend.text.color

legend text color, Default: "grey20"

legend.position

legend position, Default: "bottom"

ticks

add axis ticks, Default: FALSE

See Also

[ggplot2::theme]

Examples

library(ggplot2)

ggplot(airquality, aes(x = Day, y = Temp,
     group = as.factor(Month), color = as.factor(Month))) +
     geom_point(size = 2.5) +
     scale_color_avatar() +
     theme_avatar()

Brooklyn Nine-Nine theme

Description

Brooklyn Nine-Nine theme, Recommended font: "Roboto Condensed" (title), "Calibri Light" (other text)

Usage

theme_brooklyn99(
  text.font = NULL,
  title.font = NULL,
  legend.font = NULL,
  title.size = 18,
  text.size = 14,
  subtitle.size = 12,
  axis.title.size = 14,
  axis.text.size = 12,
  legend.title.size = 10,
  legend.text.size = 9,
  title.color = "#F9FEFF",
  subtitle.color = "#F9FEFF",
  text.color = "#F9FEFF",
  axis.title.color = "#F9FEFF",
  axis.text.color = "#F9FEFF",
  legend.title.color = "#F9FEFF",
  legend.text.color = "#F9FEFF",
  legend.position = "bottom",
  ticks = FALSE
)

Arguments

text.font

text font, Default: NULL

title.font

title font, Default: NULL

legend.font

legend font, Default: NULL

title.size

title font size, Default: 18

text.size

text font size, Default: 14

subtitle.size

subtitle font size, Default: 12

axis.title.size

axis title font size, Default: 14

axis.text.size

axis text font size, Default: 12

legend.title.size

legend title font size, Default: 10

legend.text.size

legend text font size, Default: 9

title.color

title color, Default: "F9FEFF"

subtitle.color

subtitle.color, Default: "F9FEFF"

text.color

text color, Default: "F9FEFF"

axis.title.color

axis title color, Default: "F9FEFF"

axis.text.color

axis text color, Default: "F9FEFF"

legend.title.color

legend title color, Default: "F9FEFF"

legend.text.color

legend text color, Default: "F9FEFF"

legend.position

legend position, Default: "bottom"

ticks

add axis ticks, Default: FALSE

Details

Actual font: Variants of 'Univers'

See Also

[ggplot2::theme]

Examples

library(ggplot2)

ggplot(airquality, aes(x = Day, y = Temp,
     group = as.factor(Month), color = as.factor(Month))) +
     geom_point(size = 2.5) +
     scale_color_brooklyn99() +
     theme_brooklyn99()

Hilda "Day" theme

Description

Hilda Day theme

Usage

theme_hildaDay(
  text.font = "Chelsea Market",
  title.font = "Chelsea Market",
  legend.font = "Chelsea Market",
  title.size = 18,
  text.size = 14,
  subtitle.size = 12,
  axis.title.size = 14,
  axis.text.size = 12,
  legend.title.size = 10,
  legend.text.size = 9,
  title.color = "#659794",
  subtitle.color = "#659794",
  text.color = "#659794",
  axis.title.color = "#659794",
  axis.text.color = "#93a1a1",
  legend.title.color = "#659794",
  legend.text.color = "#93a1a1",
  legend.position = "bottom",
  ticks = FALSE
)

Arguments

text.font

text font, Default: "Chelsea Market"

title.font

title font, Default: "Chelsea Market"

legend.font

legend font, Default: "Chelsea Market"

title.size

title font size, Default: 18

text.size

text font size, Default: 14

subtitle.size

subtitle font size, Default: 12

axis.title.size

axis title font size, Default: 14

axis.text.size

axis text font size, Default: 12

legend.title.size

legend title font size, Default: 10

legend.text.size

legend text font size, Default: 9

title.color

title color, Default: '#F9FEFF'

subtitle.color

subtitle color, Default: '#F9FEFF'

text.color

text color, Default: '#F9FEFF'

axis.title.color

axis title color, Default: '#F9FEFF'

axis.text.color

axis text color, Default: '#F9FEFF'

legend.title.color

legend title color, Default: '#F9FEFF'

legend.text.color

legend text color, Default: '#F9FEFF'

legend.position

legend position, Default: 'bottom'

ticks

add axis ticks, Default: FALSE

Examples

library(ggplot2)

ggplot(airquality, aes(x = Day, y = Temp,
     group = as.factor(Month), color = as.factor(Month))) +
     geom_point(size = 2.5) +
     scale_color_hilda(palette = "Day") +
     theme_hildaDay(text.font = "Times", title.font = "Times",
                    legend.font = "Times")

Hilda "Dusk" theme

Description

Hilda theme

Usage

theme_hildaDusk(
  text.font = "Chelsea Market",
  title.font = "Chelsea Market",
  legend.font = "Chelsea Market",
  title.size = 18,
  text.size = 14,
  subtitle.size = 12,
  axis.title.size = 14,
  axis.text.size = 12,
  legend.title.size = 10,
  legend.text.size = 9,
  title.color = "#F9FEFF",
  subtitle.color = "#F9FEFF",
  text.color = "#F9FEFF",
  axis.title.color = "#F9FEFF",
  axis.text.color = "#F9FEFF",
  legend.title.color = "#F9FEFF",
  legend.text.color = "#F9FEFF",
  legend.position = "bottom",
  ticks = FALSE
)

Arguments

text.font

text font, Default: "Chelsea Market"

title.font

title font, Default: "Chelsea Market"

legend.font

legend font, Default: "Chelsea Market"

title.size

title font size, Default: 18

text.size

text font size, Default: 14

subtitle.size

subtitle font size, Default: 12

axis.title.size

axis title font size, Default: 14

axis.text.size

axis text font size, Default: 12

legend.title.size

legend title font size, Default: 10

legend.text.size

legend text font size, Default: 9

title.color

title color, Default: '#F9FEFF'

subtitle.color

subtitle color, Default: '#F9FEFF'

text.color

text color, Default: '#F9FEFF'

axis.title.color

axis title color, Default: '#F9FEFF'

axis.text.color

axis text color, Default: '#F9FEFF'

legend.title.color

legend title color, Default: '#F9FEFF'

legend.text.color

legend text color, Default: '#F9FEFF'

legend.position

legend position, Default: 'bottom'

ticks

add axis ticks, Default: FALSE

Examples

library(ggplot2)

ggplot(airquality, aes(x = Day, y = Temp,
     group = as.factor(Month), color = as.factor(Month))) +
     geom_point(size = 2.5) +
     scale_color_hilda(palette = "Dusk") +
     theme_hildaDusk(text.font = "Times", title.font = "Times",
                     legend.font = "Times")

Hilda "Night" theme

Description

Hilda theme

Usage

theme_hildaNight(
  text.font = "Chelsea Market",
  title.font = "Chelsea Market",
  legend.font = "Chelsea Market",
  title.size = 18,
  text.size = 14,
  subtitle.size = 12,
  axis.title.size = 14,
  axis.text.size = 12,
  legend.title.size = 10,
  legend.text.size = 9,
  title.color = "#F9FEFF",
  subtitle.color = "#F9FEFF",
  text.color = "#F9FEFF",
  axis.title.color = "#F9FEFF",
  axis.text.color = "#F9FEFF",
  legend.title.color = "#F9FEFF",
  legend.text.color = "#F9FEFF",
  legend.position = "bottom",
  ticks = FALSE
)

Arguments

text.font

text font, Default: "Chelsea Market"

title.font

title font, Default: "Chelsea Market"

legend.font

legend font, Default: "Chelsea Market"

title.size

title font size, Default: 18

text.size

text font size, Default: 14

subtitle.size

subtitle font size, Default: 12

axis.title.size

axis title font size, Default: 14

axis.text.size

axis text font size, Default: 12

legend.title.size

legend title font size, Default: 10

legend.text.size

legend text font size, Default: 9

title.color

title color, Default: '#F9FEFF'

subtitle.color

subtitle color, Default: '#F9FEFF'

text.color

text color, Default: '#F9FEFF'

axis.title.color

axis title color, Default: '#F9FEFF'

axis.text.color

axis text color, Default: '#F9FEFF'

legend.title.color

legend title color, Default: '#F9FEFF'

legend.text.color

legend text color, Default: '#F9FEFF'

legend.position

legend position, Default: 'bottom'

ticks

add axis ticks, Default: FALSE

Examples

library(ggplot2)

ggplot(airquality, aes(x = Day, y = Temp,
     group = as.factor(Month), color = as.factor(Month))) +
     geom_point(size = 2.5) +
     scale_color_hilda(palette = "Night") +
     theme_hildaNight(text.font = "Times", title.font = "Times",
                      legend.font = "Times")

Parks & Recreation theme

Description

Parks & Recreation theme, Recommended font: "Titillium Web"

Usage

theme_parksAndRec(
  text.font = NULL,
  title.font = NULL,
  legend.font = NULL,
  title.size = 20,
  text.size = 16,
  subtitle.size = 14,
  axis.title.size = 14,
  axis.text.size = 12,
  legend.title.size = 14,
  legend.text.size = 12,
  title.color = NULL,
  subtitle.color = NULL,
  text.color = NULL,
  axis.title.color = "black",
  axis.text.color = "black",
  legend.title.color = NULL,
  legend.text.color = NULL,
  legend.position = "bottom",
  ticks = FALSE
)

Arguments

text.font

text font, Default: NULL

title.font

title font, Default: NULL

legend.font

legend font, Default: NULL

title.size

title font size, Default: 20

text.size

text font size, Default: 16

subtitle.size

subtitle font size, Default: 14

axis.title.size

axis title font size, Default: 14

axis.text.size

axis text font size, Default: 12

legend.title.size

legend title font size, Default: 14

legend.text.size

legend text font size, Default: 12

title.color

title color, Default: NULL

subtitle.color

subtitle.color, Default: NULL

text.color

text color, Default: NULL

axis.title.color

axis title color, Default: NULL

axis.text.color

axis text color, Default: NULL

legend.title.color

legend title color, Default: NULL

legend.text.color

legend text color, Default: NULL

legend.position

legend position, Default: "bottom"

ticks

add axis ticks, Default: FALSE

Details

Actual font: 'Champion HTF-Heavyweight'

See Also

[ggplot2::theme]

Examples

library(ggplot2)

ggplot(airquality, aes(x = Day, y = Temp,
     group = as.factor(Month), color = as.factor(Month))) +
     geom_point(size = 2.5) +
     scale_color_parksAndRec() +
     theme_parksAndRec()

Parks & Recreation "Light" theme (deprecated)

Description

Parks & Recreation light theme, Recommended font: "Titillium Web"

Usage

theme_parksAndRec_light(
  text.font = NULL,
  title.font = NULL,
  legend.font = NULL,
  title.size = 20,
  text.size = 16,
  subtitle.size = 14,
  axis.title.size = 14,
  axis.text.size = 12,
  legend.title.size = 14,
  legend.text.size = 12,
  title.color = "grey20",
  subtitle.color = "grey20",
  text.color = "grey20",
  axis.title.color = "grey20",
  axis.text.color = "grey20",
  legend.title.color = "grey20",
  legend.text.color = "grey20",
  legend.position = "bottom",
  ticks = FALSE
)

Arguments

text.font

text font, Default: NULL

title.font

title font, Default: NULL

legend.font

legend font, Default: NULL

title.size

title font size, Default: 20

text.size

text font size, Default: 16

subtitle.size

subtitle font size, Default: 14

axis.title.size

axis title font size, Default: 14

axis.text.size

axis text font size, Default: 12

legend.title.size

legend title font size, Default: 14

legend.text.size

legend text font size, Default: 12

title.color

title color, Default: "grey20"

subtitle.color

subtitle.color, Default: "grey20"

text.color

text color, Default: "grey20"

axis.title.color

axis title color, Default: "grey20"

axis.text.color

axis text color, Default: "grey20"

legend.title.color

legend title color, Default: "grey20"

legend.text.color

legend text color, Default: "grey20"

legend.position

legend position, Default: "bottom"

ticks

add axis ticks, Default: FALSE

Details

Actual font: 'Champion HTF-Heavyweight' This function has been deprecated in favor of 'theme_parksAndRecLight' to follow the naming conventions of the package.

See Also

[ggplot2::theme]


Parks & Recreation "Light" theme

Description

Parks & Recreation light theme, Recommended font: "Titillium Web"

Usage

theme_parksAndRecLight(
  text.font = NULL,
  title.font = NULL,
  legend.font = NULL,
  title.size = 20,
  text.size = 16,
  subtitle.size = 14,
  axis.title.size = 14,
  axis.text.size = 12,
  legend.title.size = 14,
  legend.text.size = 12,
  title.color = "grey20",
  subtitle.color = "grey20",
  text.color = "grey20",
  axis.title.color = "grey20",
  axis.text.color = "grey20",
  legend.title.color = "grey20",
  legend.text.color = "grey20",
  legend.position = "bottom",
  ticks = FALSE
)

Arguments

text.font

text font, Default: NULL

title.font

title font, Default: NULL

legend.font

legend font, Default: NULL

title.size

title font size, Default: 20

text.size

text font size, Default: 16

subtitle.size

subtitle font size, Default: 14

axis.title.size

axis title font size, Default: 14

axis.text.size

axis text font size, Default: 12

legend.title.size

legend title font size, Default: 14

legend.text.size

legend text font size, Default: 12

title.color

title color, Default: "grey20"

subtitle.color

subtitle.color, Default: "grey20"

text.color

text color, Default: "grey20"

axis.title.color

axis title color, Default: "grey20"

axis.text.color

axis text color, Default: "grey20"

legend.title.color

legend title color, Default: "grey20"

legend.text.color

legend text color, Default: "grey20"

legend.position

legend position, Default: "bottom"

ticks

add axis ticks, Default: FALSE

Details

Actual font: 'Champion HTF-Heavyweight'

See Also

[ggplot2::theme]

Examples

library(ggplot2)

ggplot(airquality, aes(x = Day, y = Temp,
     group = as.factor(Month), color = as.factor(Month))) +
     geom_point(size = 2.5) +
     scale_color_parksAndRec() +
     theme_parksAndRecLight()

Rick & Morty theme

Description

Rick & Morty theme, Recommended font: "Get Schwifty"

Usage

theme_rickAndMorty(
  text.font = NULL,
  title.font = NULL,
  legend.font = NULL,
  title.size = 20,
  text.size = 12,
  subtitle.size = 14,
  axis.title.size = 14,
  axis.text.size = 10,
  legend.title.size = 10,
  legend.text.size = 9,
  title.color = NULL,
  subtitle.color = NULL,
  text.color = NULL,
  axis.title.color = NULL,
  axis.text.color = "black",
  legend.title.color = NULL,
  legend.text.color = NULL,
  legend.position = "bottom",
  ticks = FALSE
)

Arguments

text.font

text font, Default: NULL

title.font

title font, Default: NULL

legend.font

legend font, Default: NULL

title.size

title size, Default: 20

text.size

text font size, Default: 12

subtitle.size

subtitle font size, Default: 14

axis.title.size

axis title font size, Default: 14

axis.text.size

axis text font size, Default: 10

legend.title.size

legend title font size, Default: 10

legend.text.size

legend text font size, Default: 9

title.color

title color, Default: NULL

subtitle.color

subtitle.color, Default: NULL

text.color

text color, Default: NULL

axis.title.color

axis title color, Default: NULL

axis.text.color

axis text color, Default: "black"

legend.title.color

legend title color, Default: NULL

legend.text.color

legend text color, Default: NULL

legend.position

legend position, Default: "bottom"

ticks

add axis ticks, Default: FALSE

Details

Actual font is based on Justin Roiland's handwriting!

See Also

[ggplot2::theme]

Examples

library(ggplot2)

ggplot(airquality, aes(x = Day, y = Temp,
     group = as.factor(Month), color = as.factor(Month))) +
     geom_point(size = 2.5) +
     scale_color_rickAndMorty() +
     theme_rickAndMorty()

The Simpsons theme

Description

The Simpsons theme, Recommended font: "Akbar"

Usage

theme_simpsons(
  text.font = NULL,
  title.font = NULL,
  legend.font = NULL,
  title.size = 18,
  text.size = 14,
  subtitle.size = 12,
  axis.title.size = 14,
  axis.text.size = 10,
  legend.title.size = 10,
  legend.text.size = 9,
  title.color = "#FFD235",
  subtitle.color = "#fee8c8",
  text.color = "#fee8c8",
  axis.title.color = "#fee8c8",
  axis.text.color = "#fee8c8",
  legend.title.color = "#ffffff",
  legend.text.color = "#ffffff",
  legend.position = "bottom",
  ticks = FALSE
)

Arguments

text.font

text font, Default: NULL

title.font

title font, Default: NULL

legend.font

legend font, Default: NULL

title.size

title font size, Default: 18

text.size

text font size, Default: 14

subtitle.size

subtitle font size, Default: 12

axis.title.size

axis title font size, Default: 14

axis.text.size

axis text font size, Default: 10

legend.title.size

legend title font size, Default: 10

legend.text.size

legend text font size, Default: 9

title.color

title color, Default: "#FFD235"

subtitle.color

subtitle.color, Default: "#fee8c8"

text.color

text color, Default: "#fee8c8"

axis.title.color

axis title color, Default: "#fee8c8"

axis.text.color

axis text color, Default: "#fee8c8"

legend.title.color

legend title color, Default: "#ffffff"

legend.text.color

legend text color, Default: "#ffffff"

legend.position

legend position, Default: "bottom"

ticks

add axis ticks, Default: FALSE

Details

In part inspired by ‘@nathancunn'’s blog posts on The Simpsons!

See Also

[ggplot2::theme]

Examples

library(ggplot2)

ggplot(airquality, aes(x = Day, y = Temp,
     group = as.factor(Month), color = as.factor(Month))) +
     geom_point(size = 2.5) +
     scale_color_simpsons() +
     theme_simpsons()

Spongebob Squarepants theme

Description

Spongebob Squarepants theme, Recommended font: "Some Time Later"

Usage

theme_spongeBob(
  text.font = NULL,
  title.font = NULL,
  legend.font = NULL,
  title.size = 18,
  text.size = 12,
  subtitle.size = 12,
  axis.title.size = 14,
  axis.text.size = 12,
  legend.title.size = 10,
  legend.text.size = 9,
  title.color = "#F9FEFF",
  subtitle.color = "#F9FEFF",
  text.color = "#F9FEFF",
  axis.title.color = "#F9FEFF",
  axis.text.color = "#F9FEFF",
  legend.title.color = "#F9FEFF",
  legend.text.color = "#F9FEFF",
  legend.position = "bottom",
  ticks = FALSE
)

Arguments

text.font

text font, Default: NULL

title.font

title font, Default: NULL

legend.font

legend font, Default: NULL

title.size

size of title, Default: 18

text.size

text font size, Default: 12

subtitle.size

subtitle font size, Default:12

axis.title.size

axis title font size, Default: 14

axis.text.size

axis text font size, Default: 12

legend.title.size

legend title font size, Default: 10

legend.text.size

legend text font size, Default: 9

title.color

title color, Default: "F9FEFF"

subtitle.color

subtitle.color, Default: "F9FEFF"

text.color

text color, Default: "F9FEFF"

axis.title.color

axis title color, Default: "F9FEFF"

axis.text.color

axis text color, Default: "F9FEFF"

legend.title.color

legend title color, Default: "F9FEFF"

legend.text.color

legend text color, Default: "F9FEFF"

legend.position

legend position, Default: "bottom"

ticks

add axis ticks, Default: FALSE

Details

Spongbobify your plots even more by combining with 'paintBikiniBottom()'!

See Also

[tvthemes::paintBikiniBottom]

Examples

library(ggplot2)

ggplot(airquality, aes(x = Day, y = Temp,
     group = as.factor(Month), color = as.factor(Month))) +
     geom_point(size = 2.5) +
     scale_color_spongeBob() +
     theme_spongeBob()

Avatar: The Last Airbender theme (deprecated)

Description

Avatar: The Last Airbender theme, Recommended font: "Slayer"

Usage

theme_theLastAirbender(
  text.font = NULL,
  title.font = NULL,
  legend.font = NULL,
  title.size = 14,
  text.size = 10,
  subtitle.size = 12,
  axis.title.size = 10,
  axis.text.size = 8,
  legend.title.size = 10,
  legend.text.size = 8,
  title.color = NULL,
  subtitle.color = "grey20",
  text.color = NULL,
  axis.title.color = "grey20",
  axis.text.color = "grey20",
  legend.title.color = "grey20",
  legend.text.color = "grey20",
  legend.position = "bottom",
  ticks = FALSE
)

Arguments

text.font

text font, Default: NULL

title.font

title font, Default: NULL

legend.font

legend font, Default: NULL

title.size

title font size, Default: 14

text.size

text font size, Default: 10

subtitle.size

subtitle font size, Default: 12

axis.title.size

axis title font size, Default: 10

axis.text.size

axis text font size, Default: 8

legend.title.size

legend title font size, Default: 10

legend.text.size

legend text font size, Default: 8

title.color

title color, Default: NULL

subtitle.color

subtitle.color, Default: "grey20"

text.color

text color, Default: NULL

axis.title.color

axis title color, Default: "grey20"

axis.text.color

axis text color, Default: "grey20"

legend.title.color

legend title color, Default: "grey20"

legend.text.color

legend text color, Default: "grey20"

legend.position

legend position, Default: "bottom"

ticks

add axis ticks, Default: FALSE

See Also

[ggplot2::theme]


Great Houses of Westeros palette

Description

Houses Stark, Lannister, Tyrell, Targaryen, Tully, Greyjoy, Manderly, Martell, Stannis Baratheon, & Arryn

Usage

westeros_pal(
  palette = "Stark",
  n,
  type = c("discrete", "continuous"),
  reverse = FALSE
)

scale_color_westeros(
  palette = "Stark",
  n,
  type = "discrete",
  reverse = FALSE,
  ...
)

scale_colour_westeros(
  palette = "Stark",
  n,
  type = "discrete",
  reverse = FALSE,
  ...
)

scale_fill_westeros(
  palette = "Stark",
  n,
  type = "discrete",
  reverse = FALSE,
  ...
)

Arguments

palette

name of palette, Default: "Stark"

n

number of colors

type

discrete or continuous

reverse

reverse order, Default: FALSE

...

Arguments passed on to ggplot2::discrete_scale

aesthetics

The names of the aesthetics that this scale works with.

scale_name

[Deprecated] The name of the scale that should be used for error messages associated with this scale.

name

The name of the scale. Used as the axis or legend title. If waiver(), the default, the name of the scale is taken from the first mapping used for that aesthetic. If NULL, the legend title will be omitted.

breaks

One of:

  • NULL for no breaks

  • waiver() for the default breaks (the scale limits)

  • A character vector of breaks

  • A function that takes the limits as input and returns breaks as output. Also accepts rlang lambda function notation.

labels

One of:

  • NULL for no labels

  • waiver() for the default labels computed by the transformation object

  • A character vector giving labels (must be same length as breaks)

  • An expression vector (must be the same length as breaks). See ?plotmath for details.

  • A function that takes the breaks as input and returns labels as output. Also accepts rlang lambda function notation.

limits

One of:

  • NULL to use the default scale values

  • A character vector that defines possible values of the scale and their order

  • A function that accepts the existing (automatic) values and returns new ones. Also accepts rlang lambda function notation.

expand

For position scales, a vector of range expansion constants used to add some padding around the data to ensure that they are placed some distance away from the axes. Use the convenience function expansion() to generate the values for the expand argument. The defaults are to expand the scale by 5% on each side for continuous variables, and by 0.6 units on each side for discrete variables.

na.translate

Unlike continuous scales, discrete scales can easily show missing values, and do so by default. If you want to remove missing values from a discrete scale, specify na.translate = FALSE.

na.value

If na.translate = TRUE, what aesthetic value should the missing values be displayed as? Does not apply to position scales where NA is always placed at the far right.

drop

Should unused factor levels be omitted from the scale? The default, TRUE, uses the levels that appear in the data; FALSE uses all the levels in the factor.

guide

A function used to create a guide or its name. See guides() for more information.

position

For position scales, The position of the axis. left or right for y axes, top or bottom for x axes.

call

The call used to construct the scale for reporting messages.

super

The super class to use for the constructed scale

Examples

library(scales)
show_col(westeros_pal(palette = "Stark")(5))
show_col(westeros_pal(palette = "Stannis")(5))

library(ggplot2)
ggplot(airquality, aes(x = Day, y = Temp,
     group = as.factor(Month), color = as.factor(Month))) +
     geom_point(size = 2.5) +
     scale_color_westeros(palette = "Stark")

ggplot(airquality, aes(x = Day, y = Temp,
     group = as.factor(Month), color = as.factor(Month))) +
     geom_point(size = 2.5) +
     scale_color_westeros(palette = "Stannis")

ggplot(airquality, aes(x = Day, y = Temp,
     group = as.factor(Month), color = as.factor(Month))) +
     geom_point(size = 2.5) +
     scale_colour_westeros(palette = "Stannis")

ggplot(mpg, aes(displ)) +
     geom_histogram(aes(fill = class), col = "black", size = 0.1) +
     scale_fill_westeros(palette = "Stannis")