How to plot a graph of points generated by two vectors in Julia?

369 Views Asked by At

I have two vectors where each corresponding position of each vector represents a point, for example position 1 of one vector has a value of x1 and position 1 of the other vector has a value of y1, and these values (x1 , y1) represent a point. And so on with the points (x2, y2), (x3, y3)... I need to plot a graph with this set of points.

How can I do this in Julia?

1

There are 1 best solutions below

0
Przemyslaw Szufel On

You just do scatter(x,y) to draw the points

x = [1,2,3,4];
y = [4,7,5,9];
using Plots
scatter(x,y; legend=:topleft)

enter image description here