@@ -219,18 +219,18 @@ gg2list <- function(p){
219
219
# This extracts essential info for this geom/layer.
220
220
if (L $ geom $ objname == " smooth" ) {
221
221
# smooth is really a line + ribbon geom
222
- # always draw the line
223
- misc $ smoothLine <- TRUE
224
- trace1 <- layer2traces(L , df , misc )
225
- trace1 <- lapply(trace1 , function (x ) { x $ showlegend <- FALSE ; x })
226
- misc $ smoothLine <- FALSE
227
- # draw ribbon unless se = FALSE
228
- trace2 <- if (isTRUE(L $ stat_params $ se == FALSE )) {
222
+ # draw ribbon (unless se = FALSE)
223
+ misc $ smoothRibbon <- TRUE
224
+ trace1 <- if (isTRUE(L $ stat_params $ se == FALSE )) {
229
225
NULL
230
226
} else {
231
- misc $ smoothRibbon <- TRUE
232
227
layer2traces(L , df , misc )
233
228
}
229
+ misc $ smoothRibbon <- FALSE
230
+ # always draw the line
231
+ misc $ smoothLine <- TRUE
232
+ trace2 <- layer2traces(L , df , misc )
233
+ trace2 <- lapply(trace2 , function (x ) { x $ showlegend <- FALSE ; x })
234
234
traces <- c(trace1 , trace2 )
235
235
} else {
236
236
traces <- layer2traces(L , df , misc )
0 commit comments