Rectangular coordinate system

x = c(-2,0,2)
y = c(-2,0,2)
plot(x,y,type="n", axes=F,xlab="",ylab="")

lines(c(0,2),c(0,2))
lines(c(0,2),c(0,-2))
lines(c(1,1),c(1,-1), lty="dotted")
lines(c(0,1),c(1,1), lty="dotted")

xx = c(0,1,1,0)
yy = c(0,1,-1,0)
polygon(xx, yy, col="red") 

arrows(-2,0,2,0)
arrows(0,-2,0,2)

text(-0.1,0,labels="O",pos=1)
text(2,0,labels="x",pos=1)
text(0,2,labels="y",pos=2)
text(1.1,0,labels="1",pos=1)
text(0,1,labels="1",pos=2)
Homepage
Comments

Hide Comments