Hi:
Try this instead of your original lines() statement:
lines(x + 0.1, att, type="h", col="red")
or
plot(numgoal, goal, type="h", lwd = 3)
x <- 0:5
y<-dpois(x, lambda)
att<-y*380
lines(x + 0.1, att, type="h", col="red", lwd = 3)
legend(x="topright", legend=c("Osservate", "Attese"), col=c("blac
Hi R-users,
I'm trying to built a plot of two series of data, but thees series
result "superimposed". The R-code is like this:
goal <- c(125, 143, 81, 26, 2, 3)
numgoal <- 0:5
lambda <- sum(goal*numgoal)/sum(goal)
plot(numgoal, goal, type="h")
x <- 0:5
y<-dpois(x, lambda)
att<-y*380
2 matches
Mail list logo