Skip to content

Commit 70dc3af

Browse files
committed
use RdYlBu color palette for nw plot > 9 levels
1 parent 34742cc commit 70dc3af

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

server.R

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -617,7 +617,7 @@ vcol <- reactive({
617617
pal <- c('red', 'blue', 'green3', 'cyan', 'magenta3',
618618
'yellow', 'orange', 'black', 'grey')
619619
if(ncolors>9){
620-
pal <- colorRampPalette(c("green", "blue"))(ncolors)
620+
pal <- colorRampPalette(brewer.pal(11,"RdYlBu"))(ncolors)
621621
}
622622
vcol <- pal[full_list]
623623
}
@@ -647,7 +647,7 @@ legendfill <- reactive({
647647
pal <- c('red', 'blue', 'green3', 'cyan', 'magenta3',
648648
'yellow', 'orange', 'black', 'grey')
649649
if(n>9){
650-
pal <- colorRampPalette(c("green","blue"))(n)
650+
pal <- colorRampPalette(brewer.pal(11,"RdYlBu"))(n)
651651
}
652652
legendfill <- adjustcolor(pal, alpha.f = input$transp)
653653
}
@@ -1134,7 +1134,7 @@ observe({
11341134
if(length(legendlabels())>9){
11351135
createAlert(session, inputId = "colorwarning",
11361136
title=NULL,
1137-
message="Note: Color palette becomes sequential for attributes with more than nine levels.",
1137+
message="Note: Color palette changes for attributes with more than nine levels.",
11381138
type="warning", dismiss=TRUE,
11391139
block=FALSE, append=FALSE)
11401140
}

0 commit comments

Comments
 (0)