Scale font size

scale_fontsize(x, rg = c(1, 30), fs = c(4, 16))

Arguments

x

A numeric vector.

rg

The range.

fs

Range of the font size.

Detaisl

It is a linear interpolation.

Value

A numeric vector.

Examples

x = runif(10, min = 1, max = 20)
# scale x to fontsize 4 to 16.
scale_fontsize(x)
#>  [1]  7 11  6  5  6  5  5  8  8  7