addLine | R Documentation |
Add a homogeneous line to a plot. The line parameters must be in homogeneous coordinates, e.g. (a,b,c).
addLine(l, ...) plotHLine(l, ...)
l |
A 3 \times 1 vector of the homogeneous representation of a line. |
... |
graphical parameters such as |
# two points in homogeneous coordinates p1 <- c(3,1,1) p2 <- c(0,2,1) # homogeneous line joining p1 and p2 l_12 <- join(p1,p2) l_12 # plot plot(0,0,type="n", xlim=c(-2,5),ylim=c(-2,5),asp=1) points(t(p1)) points(t(p2)) addLine(l_12,col="red",lwd=2)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.