Skip to content

Commit f90928b

Browse files
committed
merge conflicts with master
2 parents 9ab52e1 + f4bc6b9 commit f90928b

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

58 files changed

+354
-363
lines changed

DESCRIPTION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
Package: plotly
22
Type: Package
33
Title: Interactive, publication-quality graphs online.
4-
Version: 0.5.30
4+
Version: 0.5.31
55
Authors@R: c(person("Chris", "Parmer", role = c("aut", "cre"),
66
email = "[email protected]"),
77
person("Scott", "Chamberlain", role = "aut",

NAMESPACE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Generated by roxygen2 (4.1.0): do not edit by hand
1+
# Generated by roxygen2 (4.1.1): do not edit by hand
22

33
export(gg2list)
44
export(ggplot_build2)

NEWS

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,11 @@
1-
0.5.30 -- 5 May 2015
1+
0.5.31 -- 5 May 2015
22

33
Add test-cookbook-lines.R and fix bugs that showed up in those tests.
44

5+
0.5.30 -- 4 May 2015
6+
7+
Let gg2list() return a figure object.
8+
59
0.5.29 -- 16 April 2015
610

711
geom_density() as filled area chart #202

R/ggplotly.R

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -71,9 +71,9 @@ markSplit <- c(markLegends,list(boxplot=c("x")))
7171
#' Convert a ggplot to a list.
7272
#' @import ggplot2
7373
#' @param p ggplot2 plot.
74-
#' @return list representing a ggplot.
74+
#' @return figure object (list with names "data" and "layout").
7575
#' @export
76-
gg2list <- function(p){
76+
gg2list <- function(p) {
7777
if(length(p$layers) == 0) {
7878
stop("No layers in plot")
7979
}
@@ -906,7 +906,8 @@ gg2list <- function(p){
906906
flipped.layout[["yaxis"]] <- x
907907
}
908908

909-
flipped.traces$kwargs <- list(layout=flipped.layout)
909+
fig <- list(data=flipped.traces, layout=flipped.layout)
910+
911+
fig
910912

911-
flipped.traces
912913
}

R/plotly-package.r

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
#' \itemize{
88
#' \item Package: plotly
99
#' \item Type: Package
10-
#' \item Version: 0.5.20
10+
#' \item Version: 0.5.30
1111
#' \item Date: 2014-03-07
1212
#' \item License: MIT
1313
#' }

R/plotly.R

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -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) {

man/ensure_file_exist.Rd

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
% Generated by roxygen2 (4.1.0): do not edit by hand
1+
% Generated by roxygen2 (4.1.1): do not edit by hand
22
% Please edit documentation in R/tools.R
33
\name{ensure_file_exist}
44
\alias{ensure_file_exist}

man/get_config_file.Rd

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
% Generated by roxygen2 (4.1.0): do not edit by hand
1+
% Generated by roxygen2 (4.1.1): do not edit by hand
22
% Please edit documentation in R/tools.R
33
\name{get_config_file}
44
\alias{get_config_file}

man/get_credentials_file.Rd

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
% Generated by roxygen2 (4.1.0): do not edit by hand
1+
% Generated by roxygen2 (4.1.1): do not edit by hand
22
% Please edit documentation in R/tools.R
33
\name{get_credentials_file}
44
\alias{get_credentials_file}

man/gg2list.Rd

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
% Generated by roxygen2 (4.1.0): do not edit by hand
1+
% Generated by roxygen2 (4.1.1): do not edit by hand
22
% Please edit documentation in R/ggplotly.R
33
\name{gg2list}
44
\alias{gg2list}
@@ -10,7 +10,7 @@ gg2list(p)
1010
\item{p}{ggplot2 plot.}
1111
}
1212
\value{
13-
list representing a ggplot.
13+
figure object (list with names "data" and "layout").
1414
}
1515
\description{
1616
Convert a ggplot to a list.

0 commit comments

Comments
 (0)