在 Julia 中绘制两点之间的线

Plot line between 2 points in Julia

假设我们画了 10 个点,我们想在每个点之间画一条简单的线。

begin
    x,y = rand(1:10, 10), rand(1:10, 10)
    scatter(x,y)
    #Some drawing line code
end

我们如何使用 Plots.jl 包在 Julia 中做到这一点?我已经搜索了一段时间,但还没有找到任何有用的东西。

您可以使用带有关键字 marker:

的函数 plot
using Plots
x,y = rand(1:10, 10), rand(1:10, 10)
plot(x, y; marker=(:circle,5))

结果: