I'm trying different ways to plot for my data. I have a vector ld <- seq(0.001,0.4,0.005)
, and parameters for the gamma distribution are 25 (shape) and 240 (rate).
My first way for plotting was:
pr <- dgamma(ld, 25,240)
plot(ld,pr,type="b")
I also tried:
pr <- ld^{25-1}*exp(-240*ld)
plot(ld,pr,type="b")
The two plots should be the same, however I found the y-axis is different in scale. I'm wondering how to achieve the same plot using the second method? Thank you!