zeileis · GitHub

Should we support setting bg = <numeric> in [0, 1] as a shortcut for bg = adjustcolor(col, <numeric>) (as discussed in #122)?

This would be handy when we want to use pch = 21:25 with some border col and then automatically use a semi-transparent version of the same color as the bg fill. But maybe this is too specialized and esoteric to implement a special shortcut.

Application example:

p <- hcl.colors(120, rev = TRUE)[11:110]
tinyplot(lat ~ long | depth, data = quakes, pch = 21, cex = 3, lwd = 2, col = p, bg = adjustcolor(p, 0.1))

The idea would be to abbreviate the last argument to just bg = 0.1.

tinyplot with bg being a semi-transparent version of the main col

Read the original on github.com ↗