Skip to content

Commit fa8ab30

Browse files
committed
only store scale name if character
1 parent d19b6fb commit fa8ab30

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

R/ggplotly.R

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,10 @@ gg2list <- function(p){
160160
names(ranks) <- br
161161
misc$breaks[[sc$aesthetics]] <- ranks
162162
}
163-
misc$trans[sc$aesthetics] <- sc$trans$name
163+
## store if this is a reverse scale so we can undo that later.
164+
if(is.character(sc$trans$name)){
165+
misc$trans[sc$aesthetics] <- sc$trans$name
166+
}
164167
}
165168
reverse.aes <- names(misc$trans)[misc$trans=="reverse"]
166169

0 commit comments

Comments
 (0)