R语言绘图符号

楼主  收藏   举报   帖子创建时间:  2018-03-06 00:00 回复:1 关注量:161

R语言画图的时候,所能利用的绘图pch参数值如下图,可有下面的R代码生成

plot(rep(1,10),ylim=c(-2,1.2),pch=1:10,cex=3,axes=F,xlab="",ylab="")
text(rep(0.6,10),as.character(1:10))
points(rep(0,10),pch=11:20,cex=3)
text(rep(-0.4,10),as.character(11:20))
points(rep(-0.8,5),pch=21:25,cex=3)
text(rep(-1.2,5),as.character(21:25))
points(6:10, rep(-0.8,5),pch=c("*","?","X","x","&"),cex=3)
text(6:10,rep(-1.2,5),c("*","?","X","x","&"))

  • ***1泡泡鱼 2018-12-04 14:15
    #1

    如何使这些点纵向出现