positron icon indicating copy to clipboard operation
positron copied to clipboard

Plot breaks when also running `ggsave()` in the same console.

Open kylebutts opened this issue 3 weeks ago • 1 comments

Positron Version:

Steps to reproduce the issue:

  1. Create a file with the following:
library(ggplot2)
p <- ggplot(mtcars, aes(x = wt, y = mpg)) +
  geom_point()

p
ggsave("temp.png", p)
  1. Copy the entire chunk of code and run in console (this fails). Alternatively, comment out ggsave and rerun (this works)

What did you expect to happen?

Were there any error messages in the output or Developer Tools console?

A pop-up reports this error:

Error rendering plot to 812 x 928: Failed to process positron.plot request: No such file or directory (os error 2) (request: {"jsonrpc":"2.0","method":"render","params":{"height":928,"width":812,"pixel_ratio":2,"format":"png"}}) (-32603)

kylebutts avatar Jul 06 '24 16:07 kylebutts