[R] grDevices::hcl.colors using two colours: Bug or Feature?
Stevie Pederson
@tephen@peder@on@@u @end|ng |rom gm@||@com
Fri Apr 28 07:01:39 CEST 2023
Hi,
I'm not sure if this is a bug or a feature, but after updating to Rv4.3, if
requesting two colours from hcl.colors() you now get the same colour twice.
This occurs for all palettes I've tried. My reprex:
hcl.colors(2, "Vik")
[1] "#F1F1F1" "#F1F1F1"
As I have multiple workflows I run repeatedly with A vs B comparisons, this
has just broken the visualisations in many of them. Obviously a
workaround is hcl.colors(3, "Vik")[c(1, 3)] but this seems rather
unintuitive.
Thanks in advance,
Stevie
sessionInfo()
R version 4.3.0 (2023-04-21)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: Ubuntu 20.04.6 LTS
Matrix products: default
BLAS: /usr/lib/x86_64-linux-gnu/blas/libblas.so.3.9.0
LAPACK: /usr/lib/x86_64-linux-gnu/lapack/liblapack.so.3.9.0
locale:
[1] LC_CTYPE=en_AU.UTF-8 LC_NUMERIC=C
[3] LC_TIME=en_AU.UTF-8 LC_COLLATE=en_AU.UTF-8
[5] LC_MONETARY=en_AU.UTF-8 LC_MESSAGES=en_AU.UTF-8
[7] LC_PAPER=en_AU.UTF-8 LC_NAME=C
[9] LC_ADDRESS=C LC_TELEPHONE=C
[11] LC_MEASUREMENT=en_AU.UTF-8 LC_IDENTIFICATION=C
time zone: Australia/Adelaide
tzcode source: system (glibc)
attached base packages:
[1] stats graphics grDevices utils datasets methods base
loaded via a namespace (and not attached):
[1] compiler_4.3.0 tools_4.3.0
[[alternative HTML version deleted]]
More information about the R-help
mailing list