[18914] in s-news-athena
[S] summary: graphics
daemon@ATHENA.MIT.EDU (Siana Halim)
Tue Aug 10 20:54:57 1999
Date: Wed, 11 Aug 1999 07:55:28 +0700 (GMT+0700)
From: Siana Halim <sianah@peter.petra.ac.id>
To: s-news@wubios.wustl.edu
In-Reply-To: <199908041130.NAA21354@mail.boku.ac.at>
Message-Id: <Pine.OSF.3.91.990811075027.26531C-100000@peter.petra.ac.id>
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
Dear all s-news participants,
Thank' a lot for your kindly answers, but please forgive me that i did
not write my problem clear enough to you. Actually my problem is to make
e.g 3 graphics in one coordinat system, and I've got the answer recently
from Mr. Hannoever, that is :
### Create Data, three different random variables, x and y are highly
### correlated
x <- runif(50, 0, 10)
y <- x + runif(50, 1, 3)
z <- runif(50, 0, 20)
### Make a scatterplot for x and y. To get the whole picture, define
### identical limits for the x- and y-axis
plot(x, y, xlim = c(0, 12), ylim = c(0, 12))
### add a simple least squares regression line to the plot
abline(lm(y ~ x))
### add the values of z that correspond to y to the plot and use a
### different plotting symbol
points(y, z, pch = "z")
### add a local regression line of z on y to the plot
par(new = T)
plot(loess(y ~ z), lty = 3, lwd = 3, axes = F)
### add a least squares regression line of z on y to the plot
abline(lm(y ~ z), lty = 4, lwd = 4)
once more thanks a lot for your kindness.
Best Regards
Siana Halim
Industrial Engineering Dept.
Petra Christian University
Siwalankerto 121-131
Surabaya - Indonesia
phone : +62-31-843-9040 local 2373
fax : +62-31-843-6418
e-mail:sianah@peter.petra.ac.id
-----------------------------------------------------------------------
This message was distributed by s-news@wubios.wustl.edu. To unsubscribe
send e-mail to s-news-request@wubios.wustl.edu with the BODY of the
message: unsubscribe s-news