"Barplot not defined" 尝试在 Julia 中使用 Vega 包绘制条形图时

"Barplot not defined" when trying to plot a barplot using Vega package in Julia

我正在尝试使用 Julia 1.3.1 中的 Vega 包绘制条形图,并简单地从文档 (https://johnmyleswhite.github.io/Vega.jl/barplot.html) 中复制示例代码,但是 returns 错误消息 "barplot is not defined".

using Vega

x = [1, 2, 3, 4, 5]
y = [1, 2, 3, 2, 1]

barplot(x = x, y = y)
UndefVarError: barplot not defined

Stacktrace:
 [1] top-level scope at In[4]:5

类似的错误消息也会出现在其他类型的绘图中,例如 areaplot。怎么了?

来自积极维护的 GitHub repo it looks like Vega hasn't been updated in quite a while - you might want to use VegaLite