I am using R in Jupyter, but unable to plot graphs in the notebook itself.
Here is a reproducible example
set.seed(123)
mat = as.matrix(x = rnorm(100), y = rnorm(100))
plot(mat)
In Jupyter:
Error in png(tf, width, height, "in", pointsize, bg, res, antialias = antialias): unable to start png() device
Traceback:
If I use following, I can save the image in png format in current working directory.
png('test.png')
plot(mat)
dev.off()
Edit:
SessionInfo()
R version 3.4.4 (2018-03-15)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows 10 x64 (build 16299)
I have gone through following but none of them solve my problem.
I had exactly the same issue. I closed Anaconda, opened it again and then updated the kernel; Finally, it worked again without any error.
conda install -c r r-essentials