Package 'nmfspalette'

Title: A Color Palette for NOAA Fisheries
Description: This is a package that implements a color palette in line with the NOAA Fisheries Branding Guide.
Authors: Christine Stawitz [aut, cre], Bai [email protected] Li [aut], Kathryn [email protected] Doering [aut]
Maintainer: Christine Stawitz <[email protected]>
License: GPL-3 | file LICENSE
Version: 3.0.0.000
Built: 2024-10-15 05:15:52 UTC
Source: https://github.com/nmfs-fish-tools/nmfspalette

Help Index


Return function to interpolate a nmfs color palette

Description

Return function to interpolate a nmfs color palette

Usage

display_nmfs_palette(name, n, ...)

Arguments

name

Character name of palette in nmfs_palettes

n

Number of colors in palette

...

Additional arguments to pass to image()

Examples

display_nmfs_palette("oceans", 10)

Function to extract nmfs colors as hex codes

Description

Function to extract nmfs colors as hex codes

Usage

nmfs_cols(...)

Arguments

...

Character names of nmfs_colors

Examples

nmfs_cols("processblue")

Return function to interpolate a nmfs color palette

Description

Return function to interpolate a nmfs color palette

Usage

nmfs_palette(palette = "oceans", reverse = FALSE, ...)

Arguments

palette

Character name of palette in nmfs_palettes

reverse

Boolean indicating whether the palette should be reversed

...

Additional arguments to pass to colorRampPalette()

Examples

nmfs_palette("oceans")(10)

nmfspalette: A package for NOAA Fisheries color schemes

Description

The nmfspalette package provides functions to extract colors, color palettes, and use ggplot2 palettes in R.

Details

This package contains functions to support graphing in base R and ggplot2 using NOAA Fisheries colors.

Author(s)

Maintainer: Christine Stawitz [email protected]

Authors:


Color scale constructor for nmfs colors

Description

Color scale constructor for nmfs colors

Usage

scale_color_nmfs(palette = "oceans", discrete = TRUE, reverse = FALSE, ...)

Arguments

palette

Character name of palette in nmfs_palettes

discrete

Boolean indicating whether color aesthetic is discrete or not

reverse

Boolean indicating whether the palette should be reversed

...

Additional arguments passed to discrete_scale() or scale_color_gradientn(), used respectively when discrete is TRUE or FALSE

Examples

## Not run: 
ggplot(iris, aes(Sepal.Width, Sepal.Length, color = Species)) +
  geom_point(size = 4) +
  scale_color_nmfs("coral")

## End(Not run)

Fill scale constructor for nmfs colors

Description

Fill scale constructor for nmfs colors

Usage

scale_fill_nmfs(palette = "oceans", discrete = TRUE, reverse = FALSE, ...)

Arguments

palette

Character name of palette in nmfs_palettes

discrete

Boolean indicating whether color aesthetic is discrete or not

reverse

Boolean indicating whether the palette should be reversed

...

Additional arguments passed to discrete_scale() or scale_fill_gradientn(), used respectively when discrete is TRUE or FALSE

Examples

## Not run: 
ggplot(mpg, aes(manufacturer, fill = manufacturer)) +
  geom_bar() +
  theme(axis.text.x = element_text(angle = 45, hjust = 1)) +
  scale_fill_nmfs(palette = "crustacean", discrete = FALSE)

## End(Not run)