Closed SofieVG closed 1 year ago
If any color is unnamed in the colorpalette, the names of the other colors are also ignored. Not sure if this is something we can solve or if this is a ggplot issue. Reported by @AnneliesEmmaneel.
Reproducible example:
fileName <- system.file("extdata", "68983.fcs", package = "FlowSOM") flowSOM.res <- FlowSOM(fileName, compensate = TRUE, transform = TRUE, scale = FALSE, colsToUse = c(9, 12, 14:18), nClus = 10, seed = 1) values <- factor(sample(c("A", "B", "C"), 100, replace = TRUE)) p1 <- PlotVariable(flowSOM.res, variable = values, variableName = "Random", colorPalette = c("B" = "green", "A" = "red", "C" = "blue")) p2 <- PlotVariable(flowSOM.res, variable = values, variableName = "Random", colorPalette = c("B" = "green", "A" = "red", "C" = "blue", "cyan")) library(patchwork) p1 + p2
If any color is unnamed in the colorpalette, the names of the other colors are also ignored. Not sure if this is something we can solve or if this is a ggplot issue. Reported by @AnneliesEmmaneel.
Reproducible example: