I need to change chart values on the vertical y axes. I have such a data.
I need that on the y axes will be values like GNP has, from 500 to 3000, not from 1 to 20. Here is my code for drawing graphic.
library(lattice)
data(Investment, package="sandwich")
Investment <- as.data.frame(Investment)
stripplot(Investment$GNP~Investment$Investment|"Graphic",
right = F, xlab="Investment", ylab="GNP")
Thank you in advance
You should use an xyplot
instead:
library(lattice)
data(Investment, package = "sandwich")
Investment <- as.data.frame(Investment)
xyplot(
x = GNP ~ Investment | "Graphic",
data = Investment,
right = F,
xlab = "Investment",
ylab = "GNP"
)