Skip to content

Commit f1900cc

Browse files
committed
Merge pull request #480 from ropensci/rewrite
Major update to ggplotly()
2 parents 63608e5 + 5fbfd8a commit f1900cc

Some content is hidden

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

74 files changed

+2453
-3499
lines changed

DESCRIPTION

+5-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
Package: plotly
22
Title: Create Interactive Web Graphics via Plotly's JavaScript Graphing Library
3-
Version: 2.5.0
3+
Version: 3.0.0
44
Authors@R: c(person("Carson", "Sievert", role = c("aut", "cre"),
55
email = "[email protected]"),
66
person("Chris", "Parmer", role = c("aut", "cph"),
@@ -20,7 +20,7 @@ Description: Easily translate ggplot2 graphs to an interactive web-based version
2020
URL: https://plot.ly/r, https://github.com/ropensci/plotly
2121
BugReports: https://github.com/ropensci/plotly/issues
2222
Depends:
23-
ggplot2 (>= 2.0.0)
23+
ggplot2 (>= 2.1.0)
2424
Imports:
2525
scales,
2626
httr,
@@ -30,10 +30,13 @@ Imports:
3030
viridis,
3131
base64enc,
3232
htmlwidgets,
33+
tidyr,
3334
plyr
3435
Suggests:
3536
dplyr,
3637
maps,
38+
ggthemes,
39+
GGally,
3740
testthat,
3841
knitr,
3942
devtools,

NAMESPACE

+46-7
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,56 @@
11
# Generated by roxygen2: do not edit by hand
22

3+
S3method(geom2trace,GeomBar)
4+
S3method(geom2trace,GeomBlank)
5+
S3method(geom2trace,GeomBoxplot)
6+
S3method(geom2trace,GeomErrorbar)
7+
S3method(geom2trace,GeomErrorbarh)
8+
S3method(geom2trace,GeomPath)
9+
S3method(geom2trace,GeomPoint)
10+
S3method(geom2trace,GeomPolygon)
11+
S3method(geom2trace,GeomText)
12+
S3method(geom2trace,GeomTile)
13+
S3method(geom2trace,default)
314
S3method(print,figure)
415
S3method(print,plotly)
16+
S3method(to_basic,GeomAbline)
17+
S3method(to_basic,GeomArea)
18+
S3method(to_basic,GeomBoxplot)
19+
S3method(to_basic,GeomContour)
20+
S3method(to_basic,GeomDensity)
21+
S3method(to_basic,GeomDensity2d)
22+
S3method(to_basic,GeomErrorbar)
23+
S3method(to_basic,GeomErrorbarh)
24+
S3method(to_basic,GeomHline)
25+
S3method(to_basic,GeomJitter)
26+
S3method(to_basic,GeomLine)
27+
S3method(to_basic,GeomLinerange)
28+
S3method(to_basic,GeomPointrange)
29+
S3method(to_basic,GeomRaster)
30+
S3method(to_basic,GeomRect)
31+
S3method(to_basic,GeomRibbon)
32+
S3method(to_basic,GeomSegment)
33+
S3method(to_basic,GeomSmooth)
34+
S3method(to_basic,GeomStep)
35+
S3method(to_basic,GeomTile)
36+
S3method(to_basic,GeomViolin)
37+
S3method(to_basic,GeomVline)
38+
S3method(to_basic,default)
539
export("%>%")
640
export(add_trace)
741
export(as.widget)
842
export(config)
943
export(embed_notebook)
1044
export(event_data)
45+
export(geom2trace)
1146
export(get_figure)
1247
export(gg2list)
13-
export(ggplot_build2)
1448
export(ggplotly)
15-
export(group2NA)
1649
export(knit_print.figure)
1750
export(knit_print.plotly)
1851
export(last_plot)
19-
export(layer2traces)
2052
export(layout)
2153
export(offline)
22-
export(paramORdefault)
2354
export(plot_ly)
2455
export(plotly)
2556
export(plotlyOutput)
@@ -32,20 +63,28 @@ export(signup)
3263
export(style)
3364
export(subplot)
3465
export(toRGB)
66+
export(to_basic)
3567
import(ggplot2)
36-
import(httr)
37-
import(jsonlite)
3868
importFrom(base64enc,base64encode)
3969
importFrom(grDevices,col2rgb)
4070
importFrom(htmlwidgets,createWidget)
4171
importFrom(htmlwidgets,shinyRenderWidget)
4272
importFrom(htmlwidgets,shinyWidgetOutput)
4373
importFrom(htmlwidgets,sizingPolicy)
74+
importFrom(httr,GET)
75+
importFrom(httr,PATCH)
76+
importFrom(httr,POST)
77+
importFrom(httr,add_headers)
78+
importFrom(httr,config)
79+
importFrom(httr,content)
80+
importFrom(httr,stop_for_status)
81+
importFrom(jsonlite,fromJSON)
82+
importFrom(jsonlite,toJSON)
4483
importFrom(magrittr,"%>%")
4584
importFrom(plyr,ddply)
46-
importFrom(plyr,join)
4785
importFrom(plyr,summarise)
4886
importFrom(stats,setNames)
87+
importFrom(tidyr,gather)
4988
importFrom(utils,browseURL)
5089
importFrom(utils,data)
5190
importFrom(utils,getFromNamespace)

NEWS

+14
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,17 @@
1+
3.0.0
2+
3+
NEW FEATURES:
4+
5+
* ggplotly() is now about 20x faster (it avoids calling ggplot_build() 20+ times). In some cases, it might be even faster since a lot of other redundant computation is avoided.
6+
7+
CHANGES:
8+
9+
* Instead of (trying to) translate both major and minor grid lines, we now translate only major grid lines. This generally produces a result closer to the actual ggplot2 result since ggplot2 doesn't draw ticks on minor grid lines.
10+
11+
BUG FIXES:
12+
13+
* ggplotly() now supports most of scale_*()/theme()/guides(). As a result, this fixes a lot of issues (#482, #481, #479, #476, #473, #460, #456, #454, #453, #447, #443, #434, #422, #421, #399, #379, #378, #357, #318, #316, #242, #232, #211, #203, #185, #184, #161). In order to support all of scale_x_*() an scale_y_*(), we always use linear axis types, and supply ticktext/tickvals to plotly.js. This has some unfortunate consequences on hoverformatting, which may be addressed in future releases of plotly.js -- https://github.com/plotly/plotly.js/issues/320
14+
115
2.5.0 -- 1 Mar 2015
216

317
NEW FEATURES

R/build_function.R

-35
This file was deleted.

R/colour_conversion.R

-30
This file was deleted.

R/corresp_one_one.R

-107
This file was deleted.

R/figure.R

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,5 +20,5 @@ get_figure <- function(username, id) {
2020
if (missing(id)) stop("Please provide a figure id number")
2121
base_url <- file.path(get_domain(), "apigetfile", username, id)
2222
resp <- httr::GET(base_url, plotly_headers(), httr::config(ssl_verifypeer=FALSE))
23-
process(struct(resp, "figure"))
23+
process(append_class(resp, "figure"))
2424
}

0 commit comments

Comments
 (0)