Plotting vectors in a coordinate system with R or python

sim picture sim · Jun 4, 2012 · Viewed 33.7k times · Source

I am looking for advice on plotting vectors in the cartesian plane. The task is to plot points (coordinates) and then to link them with an arrow to some source point (say 0,0). The image below should give an idea. I don't care about colours and naming vectors/points, it's just about plotting arrows in the coordinate plane. I am sure some library exists in R (or python) for plotting linear algebra vectors and operations.

Any pointers would be appreciated!

vectors in a plane
(source: mathinsight.org)

Answer

danas.zuokas picture danas.zuokas · Jun 4, 2012

Or you can use arrows function in R.

plot(c(0,1),c(0,1))
arrows(0,0,1,1)