mirror of
https://github.com/dchakro/shared_Rscripts.git
synced 2026-05-17 09:12:16 -07:00
hotfix: include the upper limit in next condition
This commit is contained in:
parent
340dc08c36
commit
bd135563a9
1 changed files with 7 additions and 7 deletions
|
|
@ -25,7 +25,7 @@ returnPalette <- function(ColorVariable = NULL) {
|
|||
if (colorsNeeded > 1 & colorsNeeded < 10) {
|
||||
myPalette <- palette.colors(n = colorsNeeded,
|
||||
palette = "Classic Tableau")
|
||||
} else if (colorsNeeded > 10 & colorsNeeded < 18) {
|
||||
} else if (colorsNeeded >= 10 & colorsNeeded < 18) {
|
||||
set.seed(2023)
|
||||
myPalette <- c(palette.colors(n = 10,
|
||||
palette = "Classic Tableau"),
|
||||
|
|
@ -33,7 +33,7 @@ returnPalette <- function(ColorVariable = NULL) {
|
|||
palette = "Set2"))
|
||||
set.seed(2023)
|
||||
myPalette <- sample(myPalette)
|
||||
} else if (colorsNeeded > 18) {
|
||||
} else if (colorsNeeded >= 18) {
|
||||
myPalette <- sample(hcl.colors(n = colorsNeeded,
|
||||
palette = "Spectral"))
|
||||
}
|
||||
|
|
@ -47,7 +47,7 @@ returnPalette <- function(ColorVariable = NULL) {
|
|||
if (colorsNeeded > 1 & colorsNeeded < 10) {
|
||||
myPalette <- palette.colors(n = colorsNeeded,
|
||||
palette = "Classic Tableau")
|
||||
} else if (colorsNeeded > 10 & colorsNeeded < 18) {
|
||||
} else if (colorsNeeded >= 10 & colorsNeeded < 18) {
|
||||
set.seed(2023)
|
||||
myPalette <- c(palette.colors(n = 10,
|
||||
palette = "Classic Tableau"),
|
||||
|
|
@ -55,7 +55,7 @@ returnPalette <- function(ColorVariable = NULL) {
|
|||
palette = "Set2"))
|
||||
set.seed(2023)
|
||||
myPalette <- sample(myPalette)
|
||||
} else if (colorsNeeded > 18) {
|
||||
} else if (colorsNeeded >= 18) {
|
||||
myPalette <- sample(hcl.colors(n = colorsNeeded,
|
||||
palette = "Spectral"))
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue