Learn R Programming

SciencesPo (version 0.11.21)

add.alpha: Introduce transparency

Description

Alpha function to introduce transparency

Usage

add.alpha(color, alpha = .5)

Arguments

color
Any color or vector of colors.
alpha
Level for alpha.

encoding

UTF-8

Examples

Run this code
# setup data
x <- seq(0, 50, 1)
supply <- x * -2 + 100
demand <- x * 2
# POINT SIZE AND TRANSPARENCY
plot(supply, demand, pch = 19, cex = 3, col = add.alpha ("red", 0.5))

Run the code above in your browser using DataLab