Plot line between 2 points in Julia

Viewed 880

Suppose we have drawn 10 points and we want to draw a simple line between each one of them.

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

How can we do this in Julia using Plots.jl package?, I'd been searching for a while but haven't found anything useful yet.

1 Answers

you can use the function plot with the keyword marker:

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

result:

plot

Related