Skip to content

Commit

Permalink
Merge pull request #480 from ropensci/rewrite
Browse files Browse the repository at this point in the history
Major update to ggplotly()
  • Loading branch information
cpsievert committed Mar 8, 2016
2 parents 63608e5 + 5fbfd8a commit f1900cc
Show file tree
Hide file tree
Showing 74 changed files with 2,453 additions and 3,499 deletions.
7 changes: 5 additions & 2 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Package: plotly
Title: Create Interactive Web Graphics via Plotly's JavaScript Graphing Library
Version: 2.5.0
Version: 3.0.0
Authors@R: c(person("Carson", "Sievert", role = c("aut", "cre"),
email = "[email protected]"),
person("Chris", "Parmer", role = c("aut", "cph"),
Expand All @@ -20,7 +20,7 @@ Description: Easily translate ggplot2 graphs to an interactive web-based version
URL: https://plot.ly/r, https://github.com/ropensci/plotly
BugReports: https://github.com/ropensci/plotly/issues
Depends:
ggplot2 (>= 2.0.0)
ggplot2 (>= 2.1.0)
Imports:
scales,
httr,
Expand All @@ -30,10 +30,13 @@ Imports:
viridis,
base64enc,
htmlwidgets,
tidyr,
plyr
Suggests:
dplyr,
maps,
ggthemes,
GGally,
testthat,
knitr,
devtools,
Expand Down
53 changes: 46 additions & 7 deletions NAMESPACE
Original file line number Diff line number Diff line change
@@ -1,25 +1,56 @@
# Generated by roxygen2: do not edit by hand

S3method(geom2trace,GeomBar)
S3method(geom2trace,GeomBlank)
S3method(geom2trace,GeomBoxplot)
S3method(geom2trace,GeomErrorbar)
S3method(geom2trace,GeomErrorbarh)
S3method(geom2trace,GeomPath)
S3method(geom2trace,GeomPoint)
S3method(geom2trace,GeomPolygon)
S3method(geom2trace,GeomText)
S3method(geom2trace,GeomTile)
S3method(geom2trace,default)
S3method(print,figure)
S3method(print,plotly)
S3method(to_basic,GeomAbline)
S3method(to_basic,GeomArea)
S3method(to_basic,GeomBoxplot)
S3method(to_basic,GeomContour)
S3method(to_basic,GeomDensity)
S3method(to_basic,GeomDensity2d)
S3method(to_basic,GeomErrorbar)
S3method(to_basic,GeomErrorbarh)
S3method(to_basic,GeomHline)
S3method(to_basic,GeomJitter)
S3method(to_basic,GeomLine)
S3method(to_basic,GeomLinerange)
S3method(to_basic,GeomPointrange)
S3method(to_basic,GeomRaster)
S3method(to_basic,GeomRect)
S3method(to_basic,GeomRibbon)
S3method(to_basic,GeomSegment)
S3method(to_basic,GeomSmooth)
S3method(to_basic,GeomStep)
S3method(to_basic,GeomTile)
S3method(to_basic,GeomViolin)
S3method(to_basic,GeomVline)
S3method(to_basic,default)
export("%>%")
export(add_trace)
export(as.widget)
export(config)
export(embed_notebook)
export(event_data)
export(geom2trace)
export(get_figure)
export(gg2list)
export(ggplot_build2)
export(ggplotly)
export(group2NA)
export(knit_print.figure)
export(knit_print.plotly)
export(last_plot)
export(layer2traces)
export(layout)
export(offline)
export(paramORdefault)
export(plot_ly)
export(plotly)
export(plotlyOutput)
Expand All @@ -32,20 +63,28 @@ export(signup)
export(style)
export(subplot)
export(toRGB)
export(to_basic)
import(ggplot2)
import(httr)
import(jsonlite)
importFrom(base64enc,base64encode)
importFrom(grDevices,col2rgb)
importFrom(htmlwidgets,createWidget)
importFrom(htmlwidgets,shinyRenderWidget)
importFrom(htmlwidgets,shinyWidgetOutput)
importFrom(htmlwidgets,sizingPolicy)
importFrom(httr,GET)
importFrom(httr,PATCH)
importFrom(httr,POST)
importFrom(httr,add_headers)
importFrom(httr,config)
importFrom(httr,content)
importFrom(httr,stop_for_status)
importFrom(jsonlite,fromJSON)
importFrom(jsonlite,toJSON)
importFrom(magrittr,"%>%")
importFrom(plyr,ddply)
importFrom(plyr,join)
importFrom(plyr,summarise)
importFrom(stats,setNames)
importFrom(tidyr,gather)
importFrom(utils,browseURL)
importFrom(utils,data)
importFrom(utils,getFromNamespace)
Expand Down
14 changes: 14 additions & 0 deletions NEWS
Original file line number Diff line number Diff line change
@@ -1,3 +1,17 @@
3.0.0

NEW FEATURES:

* 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.

CHANGES:

* 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.

BUG FIXES:

* 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

2.5.0 -- 1 Mar 2015

NEW FEATURES
Expand Down
35 changes: 0 additions & 35 deletions R/build_function.R

This file was deleted.

30 changes: 0 additions & 30 deletions R/colour_conversion.R

This file was deleted.

107 changes: 0 additions & 107 deletions R/corresp_one_one.R

This file was deleted.

2 changes: 1 addition & 1 deletion R/figure.R
Original file line number Diff line number Diff line change
Expand Up @@ -20,5 +20,5 @@ get_figure <- function(username, id) {
if (missing(id)) stop("Please provide a figure id number")
base_url <- file.path(get_domain(), "apigetfile", username, id)
resp <- httr::GET(base_url, plotly_headers(), httr::config(ssl_verifypeer=FALSE))
process(struct(resp, "figure"))
process(append_class(resp, "figure"))
}
Loading

0 comments on commit f1900cc

Please sign in to comment.