SciencesPo (version 1.3.8)

fade: Add transparency

Description

Alpha function to add transparency in graphic objects

Usage

fade(color, alpha = 0.5)

Arguments

color
Any color or vector of colors
alpha
Level for alpha, default is 0.5

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 = fade("red", 0.5))

Run the code above in your browser using DataLab