Laboratory of Microbial Genomics and Big Data (강원대학교 미생물유전체빅데이터 연구실)

R: Graph - Circle Equations - by Eun Bae Kim (11/30/2018)
 Visits : 497,898 ( Your IP 18.219.94.17 )
 

 1: 
 2: 
 3: 
 4: 
 5: 
 6: 
 7: 
 8: 
 9: 
 10: 
 11: 
 12: 
 13: 
 14: 
 15: 
 16: 
 17: 
 18: 
 19: 
 20: 
 21: 
 22: 
 23: 
############################################################
# Making a Circle
par(mfrow = c(1, 2))
x=-100:100
y=sqrt(100**2 - x**2)
x=c(x, x)
y=c(y, -y)
plot(x, y, cex=0.5)
lines(x, y, col="red", lty=21)
abline(h=0, lty=21, col="blue")
abline(v=0, lty=21, col="blue")
text(0, 10, "x^2 + y^2 = r^2", pos=4)

############################################################
x=0:200
y=sqrt(100**2 - (x-100)**2)
x=c(x, x)
y=c(y, -y)
plot(x, y, cex=0.5)
lines(x, y, col="red", lty=21)
abline(h=0, lty=21, col="blue")
abline(v=100, lty=21, col="blue")
text(100, 10, "(x-100)^2 + y^2 = r^2", pos=4)


Figure 1. R: Graph - Circle Equations


Kangwon National University