diff --git a/DESCRIPTION b/DESCRIPTION index bf6321cd..432003cd 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -36,6 +36,7 @@ Authors@R: Description: Lightweight extension of the base R graphics system, with support for automatic legends, facets, themes, and various other enhancements. License: Apache License (>= 2) +Remotes: etiennebacher/altdoc Depends: R (>= 4.0) Imports: @@ -45,7 +46,7 @@ Imports: tools, utils Suggests: - altdoc (>= 0.5.0), + altdoc (>= 0.5.0.9000), fontquiver, png, rsvg, diff --git a/R/by_aesthetics.R b/R/by_aesthetics.R index 857902ce..6cde8c6d 100755 --- a/R/by_aesthetics.R +++ b/R/by_aesthetics.R @@ -37,8 +37,11 @@ by_col = function(ngrps = 1L, col = NULL, palette = NULL, gradient = NULL, order } if (isTRUE(gradient)) { col = rev(col) + } else if (!ordered && is.numeric(col)) { + col = palette()[col] } if (anyNA(col) || is.character(col)) { + if (alpha) col = adjustcolor(col, alpha.f = alpha) return(col) } }