R-Jupyter笔记本:绘图时出现文本错误

时间:2018-12-02 21:46:03

标签: r ggplot2 plot jupyter-notebook

我正在使用R内核在jupyter笔记本中使用ggplot / baseplot进行绘图(并且已加载软件包repr)。但是,不会显示任何文字/仅显示位置奇怪的f。知道原因是什么吗?

查看ggplot:

shell_command = "ls -l"
subprocess.call(shell_command.split())

enter image description here

正常的基本R图也是如此:

data("iris")
scatter <- ggplot(data=iris, aes(x = Sepal.Length, y = Sepal.Width)) 
scatter + geom_point(aes(color=Species, shape=Species)) +
 xlab("Sepal Length") +  ylab("Sepal Width") +
 ggtitle("Sepal Length-Width")

enter image description here

options(repr.plot.width=4, repr.plot.height=3)
options(jupyter.plot_mimetypes = "image/svg+xml")
plot(iris$Sepal.Length, iris$Sepal.Width, main = "blabla")

0 个答案:

没有答案