Skip to content

How to plot two variables in the same qqnorm-plot?

2 messages · Jenny persson, Dimitris Rizopoulos

#
try this:

z1 <- rnorm(100)
z2 <- rt(100, 3)
##########
q1 <- qqnorm(z1, plot.it = FALSE)
q2 <- qqnorm(z2, plot.it = FALSE)
plot(range(q1$x, q2$x), range(q1$y, q2$y), type = "n")
points(q1)
points(q2, col = "red", pch = 3)


I hope it helps.

Best,
Dimitris

----
Dimitris Rizopoulos
Ph.D. Student
Biostatistical Centre
School of Public Health
Catholic University of Leuven

Address: Kapucijnenvoer 35, Leuven, Belgium
Tel: +32/(0)16/336899
Fax: +32/(0)16/337015
Web: http://med.kuleuven.be/biostat/
     http://www.student.kuleuven.be/~m0390867/dimitris.htm


----- Original Message ----- 
From: "Jenny persson" <jenny197806 at yahoo.se>
To: <r-help at stat.math.ethz.ch>
Sent: Friday, December 08, 2006 11:30 AM
Subject: [R] How to plot two variables in the same qqnorm-plot?
--------------------------------------------------------------------------------
Disclaimer: http://www.kuleuven.be/cwis/email_disclaimer.htm