Learn R Programming

ocean (version 0.1-0)

bathy.colors: Bathymetric data color scheme

Description

Generates a color ramp from light grey to blue.

Usage

bathy.colors(n, alpha=1)

Arguments

n
The number of colors to generate.
alpha
Alpha values to be passed through to rgb.

Value

  • A vector of n colors linearly spaced from light grey to pure blue.

Examples

Run this code
# Plot a matrix using bathy.colors
  mat <- matrix(seq(100), 100, 1)
  image(mat, col=bathy.colors(100))

  # Plot a bowl chape using bathy.colors
  example(att.plot)

Run the code above in your browser using DataLab