R語言中text函數


 

1、

par(mfrow=c(3,2)) plot(1:10) text(1,5,"aa", cex = 2,col = "red") plot(1:10) text(5,5,"bb",cex = 2, col = "blue") plot(1:10) text(5,5, "cc", cex = 2, col = "green", pos = 1) plot(1:10) text(5,5, "cc", cex = 2, col = "purple", pos = 2) plot(1:10) text(5,5, "cc", cex = 2, col = "cyan", pos = 3) plot(1:10) text(5,5, "cc", cex = 2, col = "magenta", pos = 4)

 

 

2、

par(mfrow=c(3,2)) plot(1:10) text(1,5,"bb",cex = 2, col = "red") plot(1:10) text(5,5,"bb",cex = 2, col = "blue") plot(1:10) text(5,5,"bb",cex = 2, col = "green",adj=4) plot(1:10) text(5,5,"bb",cex = 2, col = "purple",adj=-4) plot(1:10) text(5,5,"bb",cex = 2, col = "magenta",adj=c(4,4)) plot(1:10) text(5,5,"bb",cex = 2, col = "brown",adj=c(-4,-4))

 

 

3、

plot(1:10) text(seq(2,8,2),seq(8,2,-2),c("AA","BB","CC","DD"), cex = c(1:4), col = c("red","blue","green","brown"))

 


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM