Skip to content

Commit c4f1001

Browse files
committed
Write graph JSON to tempfile before calling orca CLI
Otherwise, the command can error out if the JSON blob is too big
1 parent d9e8526 commit c4f1001

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

R/orca.R

+4-1
Original file line numberDiff line numberDiff line change
@@ -49,8 +49,11 @@ orca <- function(p, file = "plot.png", format = tools::file_ext(file),
4949
plotlyjs <- plotlyjsBundle(b)
5050
plotlyjs_file <- file.path(plotlyjs$src$file, plotlyjs$script)
5151

52+
tmp <- tempfile(fileext = ".json")
53+
cat(to_JSON(b$x[c("data", "layout")]), file = tmp)
54+
5255
args <- c(
53-
"graph", to_JSON(b$x[c("data", "layout")]),
56+
"graph", tmp,
5457
"-o", file,
5558
"--format", format,
5659
"--plotlyjs", plotlyjs_file,

0 commit comments

Comments
 (0)