stencila/rasta

'replayPlot' is not an exported object from 'namespace:graphics'

Closed this issue ยท 1 comments

When encoding a plot output of a CodeChunk get this error

rasta/R/decode.R

Lines 29 to 41 in 5956a44

decode_image_object <- function(value, format = "png") {
# Render the plot onto the file device
path <- tempfile(fileext = paste0(".", format))
get(format)(path)
if (inherits(value, "recordedplot")) graphics::replayPlot(value)
else print(value)
graphics::dev.off()
# Return an ImageObject with the file contents base64 encoded
stencilaschema::ImageObject(
contentUrl = paste0("data:image/", format, ";base64,", base64enc::base64encode(path))
)
}

There should be a test for the decode functions (it's new; there isn't) and an issue regression test for this issue.

๐ŸŽ‰ This issue has been resolved in version 0.4.1 ๐ŸŽ‰

The release is available on GitHub release

Your semantic-release bot ๐Ÿ“ฆ๐Ÿš€