更改图形轴上的图表值。语言 R

Change chart values on the graphic axes. Language R

我需要更改垂直 y 轴上的图表值。我有这样一个数据。

我需要在 y 轴上有像 GNP 那样的值,从 500 到 3000,而不是从 1 到 20。 这是我绘制图形的代码。

      library(lattice)
      data(Investment, package="sandwich")
      Investment <- as.data.frame(Investment)
      stripplot(Investment$GNP~Investment$Investment|"Graphic", 
      right = F, xlab="Investment", ylab="GNP")

提前致谢

您应该改用 xyplot

library(lattice)
data(Investment, package = "sandwich")
Investment <- as.data.frame(Investment)

xyplot(
  x = GNP ~ Investment | "Graphic",
  data = Investment,
  right = F,
  xlab = "Investment",
  ylab = "GNP"
)