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))

相关文章:

  • 2021-11-14
  • 2021-08-28
  • 2022-12-23
  • 2022-12-23
  • 2021-04-03
  • 2021-08-04
  • 2021-11-28
猜你喜欢
  • 2022-12-23
  • 2021-10-12
  • 2021-08-25
  • 2022-12-23
  • 2021-10-23
  • 2021-08-07
  • 2021-05-06
相关资源
相似解决方案