Skip to content

Commit 39b2546

Browse files
committed
set default colour if no colour aes exists
1 parent 9b1ad3c commit 39b2546

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

R/trace_generation.R

+2-1
Original file line numberDiff line numberDiff line change
@@ -412,7 +412,8 @@ toBasic <- list(
412412
g
413413
},
414414
smoothLine=function(g) {
415-
if (length(unique(g$data$group)) == 1) g$params$colour <- "#3366FF"
415+
if (length(grep("^colour$", names(g$data))) == 0)
416+
g$params$colour <- "#3366FF"
416417
group2NA(g, "path")
417418
},
418419
smoothRibbon=function(g) {

0 commit comments

Comments
 (0)