We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent c170737 commit 7f4435cCopy full SHA for 7f4435c
R/plotly.R
@@ -139,11 +139,15 @@ For more help, see https://plot.ly/R or contact <[email protected]>.")
139
if(!is.ggplot(gg)){
140
stop("gg must be a ggplot")
141
}
142
- pargs <- gg2list(gg)
+ fig <- gg2list(gg)
143
if (!"auto_open" %in% names(kwargs)) {
144
kwargs <- c(kwargs, auto_open=TRUE)
145
146
- pargs$kwargs <- c(pargs$kwargs, kwargs)
+
147
+ pargs <- fig$data
148
+ pargs$kwargs <- kwargs
149
+ pargs$kwargs$layout <- fig$layout
150
151
if (session == "interactive") { # we are on the command line
152
resp <- do.call(pub$plotly, pargs)
153
if (pargs$kwargs$auto_open) {
0 commit comments