标签: r
par(mar=c(5,5,2,5), xpd=TRUE) x <- seq(0,5,0.5) y <- seq(0,5,0.5) plot(x,y, xlab="", ylab="")
有没有一种方法可以用符号pch = 2,pch = 4,pch = 6,pch = 8,pch = 10,pch替换x轴标签(0,1,2,3,4,5) = 12?
答案 0 :(得分:1)
一个相当手动的解决方案,但这通常是您使用基本图形所获得的:
par(mar=c(5,5,2,5), xpd=TRUE) x <- seq(0,5,0.5) y <- seq(0,5,0.5) plot(x,y, xlab="", ylab="",xaxt = "n") axis(side = 1,at = 0:5,labels = FALSE) points(x = 0:5,y = rep(-0.5,6),pch = c(2,4,6,8,10,12))