Custom palette
This commit is contained in:
14
app.R
14
app.R
@@ -204,6 +204,9 @@ server <- function(input, output, session) {
|
||||
|
||||
dataStorage <- "data/"
|
||||
|
||||
palette <- c("firebrick", "coral", "rosybrown", "tan", "salmon", "olivedrab", "seagreen", "aquamarine", "darkcyan", "dodgerblue", "steelblue", "royalblue")
|
||||
|
||||
|
||||
models <- NULL
|
||||
pressures <- NULL
|
||||
|
||||
@@ -500,7 +503,6 @@ server <- function(input, output, session) {
|
||||
|
||||
nodeSpacing <- ifelse(.selections$bbnNames, 600, 150)
|
||||
|
||||
palette <- brewer.pal(nrow(model$legend), "Set3")
|
||||
|
||||
nodes <- data.frame(
|
||||
id = rownames(nodes),
|
||||
@@ -540,6 +542,7 @@ server <- function(input, output, session) {
|
||||
}
|
||||
|
||||
|
||||
|
||||
legendDF <- data.frame(
|
||||
id = 1:nrow(model$legend),
|
||||
label = model$legend,
|
||||
@@ -573,10 +576,13 @@ server <- function(input, output, session) {
|
||||
genPlot <- function(boxPlot, title, paletteLength) {
|
||||
if (nrow(boxPlot) > 0) {
|
||||
|
||||
print(paste('Palette length', paletteLength))
|
||||
#print(paste('Palette length', paletteLength))
|
||||
|
||||
palette <- brewer.pal(paletteLength, "Set3")
|
||||
names(palette) <- 1:paletteLength
|
||||
#palette <- brewer.pal(paletteLength, "Set3")
|
||||
|
||||
#palette <- c("red", "sienna3", "plum2", "rosybrown4", "sandybrown", "yellow", "seashell3", "palegreen", "springgreen4", "steelblue", "azure")
|
||||
|
||||
names(palette) <- 1:length(palette)
|
||||
|
||||
#print(paste("Box plot, colours", nrow(boxPlot), length(colours)))
|
||||
#cat(colours)
|
||||
|
||||
Binary file not shown.
Reference in New Issue
Block a user