Eduardo Uriegas
Eduardo Uriegas

Reputation: 77

Plot line between 2 points in Julia

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.

Upvotes: 3

Views: 3665

Answers (1)

MarcMush
MarcMush

Reputation: 1488

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

Upvotes: 6

Related Questions