Zeichnen Sie zwei Diagramme in der gleichen Grafik in R

Ich möchte y1 und y2 in der gleichen Handlung zeichnen.

x  <- seq(-2, 2, 0.05)
y1 <- pnorm(x)
y2 <- pnorm(x, 1, 1)
plot(x, y1, type = "l", col = "red")
plot(x, y2, type = "l", col = "green")

Aber wenn ich es so mache, werden sie nicht zusammen in der gleichen Handlung gezeichnet.

n Matlab kann manhold on, aber weiß jemand, wie man das in R macht?

Antworten auf die Frage(15)

Ihre Antwort auf die Frage