Ask a Question
Ask Question Login
Corporate Training
  1. Community
  2. Data Science
  3. Question
Data Science

Plot two graphs in the same plot in R

Asked by Claudine Tippins Jun 3, 2021 841 views 1 answer
Share

About this question

How can I plot two graphs in same plot in R, I am using this command to perform my task but it isn’t working.

 x <- seq(-3, 4, 1.05)
y1 <- pnorm(x)
y2 <- pnorm(x, 2, 2)
plot(x, y1, type = "2", col = "blue")
plot(x, y2, type = "l", col = "yellow")

 How R  plot two graphs on top of each other? Please help me with it.


Your answer

1 Answer

More Data Science discussions

Learn & Explore

Free tutorials and interview questions from industry experts — learn the skill, then get ready to prove it.

Latest Data Science Blogs

Guides, tips and career advice on Data Science from JanBask experts.