Category: Graphics

R-Color Palettes

No Comments

R has many built-in color palettes. They can be used as graphical parameters as below.

  1. colĀ = rainbow(n)
  2. col = heat.colors(n)
  3. col = topo.colors(n)
  4. col – terrain.colors(n)
  5. col = cm.colors(n)

n is the size of the values being plotted. For more info enter the following help commands:

1. help(package=colorspace)

2. ?rainbow

Categories: Graphics, R-Stats