Skip to content

Commit b4a142b

Browse files
committed
allow export to pick up the last plot
1 parent dcf4bc9 commit b4a142b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

R/export.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
#' @examples \dontrun{
99
#' export(plot_ly(economics, x = ~date, y = ~pce))
1010
#' }
11-
export <- function(p, file = "plotly.png", ...) {
11+
export <- function(p = last_plot(), file = "plotly.png", ...) {
1212
if (system.file(package = "webshot") == "") {
1313
stop(
1414
'Please install the webshot package ',

0 commit comments

Comments
 (0)