如何将条形图 x 轴上的标签从数字更改为文本?

How to change labels on the x axis of a bar plot from numbers to text?

我正在尝试使用 Plots.jl 和 GR 后端制作条形图,想问一下如何让 x 轴显示文本标签而不是数字。基本上这就是我正在做的事情:

using Plots; gr()
data = [1,2,3]
labels = ["one","two","three"]

bar(data, legend=false)

这会产生以下情节:

如何在 x 轴上显示我的标签(“一”、“二”、“三”)而不是“1 2 3”?

谢谢!

答案(感谢 Tom!)是将标签作为 x 值传递(目前只能在开发分支上使用):

Pkg.checkout("Plots","dev")
using Plots
gr()

data = [1,2,3]
labels = ["one","two","three"]

bar(labels, data, legend=false)