【发布时间】:2020-10-02 16:57:36
【问题描述】:
我正在使用 Pluto.jl 笔记本。我想使用 ggplot2 R 库来制作一些绘图。
按照this example,如果我在 Julia REPL 中运行以下代码,那么我可以获得 ggplot2 图形输出。
using RCall
@rlibrary ggplot2
using DataFrames
df = DataFrame(v = [3,4,5], w = [5,6,7], x = [1,2,3], y = [4,5,6], z = [1,1,2])
ggplot(df, aes(x=:x,y=:y)) + geom_line()
现在,当我在 pluto.jl 笔记本中使用相同的代码(每行是一个单独的单元格)时,我收到以下错误消息:
有没有办法让 ggplot2 图像出现在 pluto notebook 中?
同样,如果我只是在单元格中输入ggplot(),我会得到同样的错误,但ggplot not defined。
【问题讨论】: