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