Skip to content
Snippets Groups Projects
Commit b137cbbd authored by Gael  MILLOT's avatar Gael MILLOT
Browse files

bug removed in fun_gg_boxplot when having a single color in dot.plot argument

parent b5c85869
No related branches found
No related tags found
No related merge requests found
......@@ -10240,7 +10240,7 @@ fun_gg_boxplot <- function(
data1$dot.color <- factor(data1$dot.color, labels = dot.color) # do not use labels = unique(dot.color). Otherwise, we can have green1 green2 when dot.color is c("green", "green")
}else if(length(dot.color) > 1 & length(dot.color) == length(data1[, dot.categ])){
data1 <- data.frame(data1, dot.color = dot.color, stringsAsFactors = TRUE)
}else if(length(dot.color)== 1L & length(dot.categ.class.order) > 1){ # to deal with single color
}else if(length(dot.color)== 1L){ # to deal with single color. Warning: & length(dot.categ.class.order) > 1 removed because otherwise, the data1 is not with dot.color column when length(dot.categ.class.order) == 1
data1 <- data.frame(data1, dot.color = dot.color, stringsAsFactors = TRUE)
}
dot.color <- as.character(unique(data1$dot.color[order(data1[, dot.categ])])) # reorder the dot.color character vector
......@@ -11372,7 +11372,6 @@ fun_gg_boxplot <- function(
 
 
 
# add density
# rasterise all kind: https://cran.r-project.org/web/packages/ggrastr/vignettes/Raster_geoms.html
# log not good: do not convert as in boxplot
No preview for this file type
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment