R 如何 隐藏坐标轴

x = c(7,5,8)
dim(x)<-3
names(x)<-c("apple","banana", "cherry")
plot(x, type="b",xaxt="n", xlab="fruits",ylab="number")
axis(1,1:3,labels = names(x))
#矢量表示
x = c(7,5,8)
names(x)<-c("apple","banana", "cherry")
plot(as.vector(x), type="b",xaxt="n", xlab="fruits",ylab="number")
axis(1,1:3,labels = names(x))

原文地址:https://www.cnblogs.com/xinping-study/p/4721303.html