Skip to content
Prev 169308 / 398506 Next

overlay plot question

Greetings all,

I have two logistic plots coming from two calls to plogis.  The code is

.x <- seq(-7.6, 7.6, length=100)
  plot(.x, plogis(.x, location=0, scale=1), xlab="x", ylab="Density",
 main="Logistic Distribution: location = 0, scale = 1", type="l")
  abline(h=0, col="gray")
 

.y <- seq(-7.6, 7.6, length=100)
  plot(.x, plogis(.x, location=2, scale=4), xlab="x", ylab="Density",
  main="Logistic Distribution: location = 2, scale = 4", type="l")
 abline(h=0, col="gray")
 
 remove(.x)

 remove(.y)


I would like to overlay these on one plot.  Notice here the y-axis is 
different.  But I would like to axis to be 0 to 1 as in the first plot.

Any suggestions would be greatly appreciated.

Thanks in advance,

David