Learn R Programming

sommer (version 4.3.5)

bathy.colors: Generate a sequence of colors for plotting bathymetric data.

Description

bathy.colors(n) generates a sequence of \(n\) colors along a linear scale from light grey to pure blue.

Usage

bathy.colors(n, alpha = 1)

Value

A vector of blue scale colors.

Arguments

n

The number of colors to return.

alpha

Alpha values to be passed to rgb().

Examples

Run this code
{
# Plot a colorbar using bathy.colors
image(matrix(seq(100), 100), col=bathy.colors(100))
}

Run the code above in your browser using DataLab