Learn R Programming

metools (version 1.0.0)

p.gradientcolor: Create Gradient

Description

p.gradientcolor is a function to make easy create gradient pallet. Recommended to color graphics created with metools p.functions.

Usage

p.gradientcolor(color1, color2, n)

Arguments

color1

First gradient color

color2

Last gradient color

n

Number of colors

Value

Return a vector with colors.

Examples

Run this code
# NOT RUN {
p.gradientcolor(color1="white",color2="blue",n=10)

v = p.gradientcolor("white","blue",n=20)
barplot(seq.int(from=1,to=20,by=1),col=v)

# }

Run the code above in your browser using DataLab