Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Plotting vectors in a coordinate system with R or python

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)

like image 645
sim Avatar asked Jun 04 '12 13:06

sim


1 Answers

Or you can use arrows function in R.

plot(c(0,1),c(0,1))
arrows(0,0,1,1)
like image 144
danas.zuokas Avatar answered Oct 04 '22 03:10

danas.zuokas