enter image description hereI have generate 1000 set of random data for Poisson Distribution and plot all the data into a probability distribution graph. I would like to change the x-axis scale as 2 per unit like 0,2,4,6,8,10....I have set the max and min value of x-axis but it didn't show what I expect
set.seed(124)
Sample1000 <- replicate(1000, matrix(data=rpois(100, lambda = 3),ncol = 1), simplify = TRUE)
Graph1000 <- gather(as.data.frame(Sample1000))
View(Sample1000)
colMeans(Sample1000)
apply(Sample1000, 2, var)
ggplot(Graph1000, aes(x = value)) +
geom_density(aes(group = key)) +
labs(x = "y", y = "P(y)", title = "Probability density function for 1000 sample") +
theme_classic() +
theme(plot.title = element_text(hjust = 0.5)) +
scale_x_continuous(expand = c(0,0), limits = c(0,14)) +
scale_y_continuous(expand = c(0,0))