@@ -82,14 +82,14 @@ For more help, see https://plot.ly/R or contact <
[email protected] >.")
8282
8383 # public attributes/methods that the user has access to
8484 pub <- list (username = username , key = key , filename = " from api" , fileopt = NULL ,
85- version = " 0.5.20 " )
85+ version = " 0.5.30 " )
8686 priv <- list ()
8787
8888 pub $ makecall <- function (args , kwargs , origin ) {
8989 if (is.null(kwargs $ filename ))
9090 kwargs $ filename <- pub $ filename
9191 if (is.null(kwargs $ fileopt ))
92- kwargs $ fileopt <- NULL
92+ kwargs $ fileopt <- pub $ fileopt
9393 url <- paste(base_url , " /clientresp" , sep = " " )
9494
9595 respst <- postForm(url , platform = " R" , version = pub $ version ,
@@ -139,11 +139,15 @@ For more help, see https://plot.ly/R or contact <
[email protected] >.")
139139 if (! is.ggplot(gg )){
140140 stop(" gg must be a ggplot" )
141141 }
142- pargs <- gg2list(gg )
142+ fig <- gg2list(gg )
143143 if (! " auto_open" %in% names(kwargs )) {
144144 kwargs <- c(kwargs , auto_open = TRUE )
145145 }
146- pargs $ kwargs <- c(pargs $ kwargs , kwargs )
146+
147+ pargs <- fig $ data
148+ pargs $ kwargs <- kwargs
149+ pargs $ kwargs $ layout <- fig $ layout
150+
147151 if (session == " interactive" ) { # we are on the command line
148152 resp <- do.call(pub $ plotly , pargs )
149153 if (pargs $ kwargs $ auto_open ) {
0 commit comments