在 Julia 中,我可以提供一种颜色作为 Int。例如,这有效:
Using Plots()
# Using gr backend
gr()
x = [1,2,3]
y = [1,2,3]
cols = [1,2,3]
scatter(x,y, markercolor = cols, leg = false)
如果我想改变形状,我可以提供以下内容:
shapes = [:hex, :circle, :hex]
scatter(x, y, markershape = shapes, markercolor = cols, leg = false)
但似乎我无法将标记形状提供为 Int!
shapes = [1, 2, 3]
scatter(x, y, markershape = shapes, markercolor = cols, leg = false)
是否有任何简单的方法可以为 Plots 中的形状提供 Int?还是将整数转换为形状的好方法?