Skip to content

Commit 4d957ab

Browse files
committed
Fix "partial argument match" warnings (plotly#1977)
1 parent 2ef4a3f commit 4d957ab

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

R/ggplotly.R

+2-2
Original file line numberDiff line numberDiff line change
@@ -182,7 +182,7 @@ gg2list <- function(p, width = NULL, height = NULL,
182182
} else if (capabilities("jpeg")) {
183183
grDevices::jpeg
184184
} else if (system.file(package = "Cairo") != "") {
185-
Cairo::Cairo
185+
function(filename, ...) Cairo::Cairo(file = filename, ...)
186186
} else {
187187
stop(
188188
"No Cairo or bitmap device is available. Such a graphics device is required to convert sizes correctly in ggplotly().\n\n",
@@ -198,7 +198,7 @@ gg2list <- function(p, width = NULL, height = NULL,
198198
height <- height %||% default(grDevices::dev.size("px")[2])
199199
}
200200
# open the device and make sure it closes on exit
201-
dev_fun(file = tempfile(), width = width %||% 640, height = height %||% 480)
201+
dev_fun(filename = tempfile(), width = width %||% 640, height = height %||% 480)
202202
on.exit(grDevices::dev.off(), add = TRUE)
203203

204204
# check the value of dynamicTicks

0 commit comments

Comments
 (0)