I have used the following code to plot a beta curve:
p <- seq(0, 1, length=100)
plot(p, dbeta(p, 5, 7), ylab="density", type="l", col=4)
I wanted to plot two curves on the same graph and so repeated the second line using different numerical values in place of the 5 and 7. This resulted in the second curve being printed on a different graph (i.e. I got two separate graphs). Could anyone explain how to get both curves on the same graph?
question from:https://stackoverflow.com/questions/65933746/plotting-beta-curves-in-r