我正在使用Jupyter中的R语言,但是无法在笔记本中绘制图表。
这里有一个可重现的例子:
set.seed(123)
mat = as.matrix(x = rnorm(100), y = rnorm(100))
plot(mat)
在Jupyter中:
Error in png(tf, width, height, "in", pointsize, bg, res, antialias = antialias): unable to start png() device
Traceback:
如果我使用以下代码,可以将图像保存为当前工作目录下的png格式。
png('test.png')
plot(mat)
dev.off()
编辑:
SessionInfo()
R version 3.4.4 (2018-03-15)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows 10 x64 (build 16299)
我已经阅读了以下内容,但是它们都没有解决我的问题。