Skip to content
Back to formatted view

Raw Message

Message-ID: <93d6f2a80809191045u3bc3d902uf81370e07126b5d7@mail.gmail.com>
Date: 2008-09-19T17:45:57Z
From: Juliet Hannah
Subject: reproduce this graph in ggplot2 (code and data included)

How can I reproduce this graph in ggplot2 (regression lines and data
point superimposed). Thanks, Juliet

filename="http://personality-project.org/r/datasets/heating.txt"
heating=read.table(filename,header=TRUE)
symb=c(19,25,3,23)
colors=c("black","red","green","blue")
plot(degreedays,therms,pch=symb[Location],col=colors[Location],bg=colors[Location],cex=1.0)
by(heating,Location,function(x) abline(lm(therms~degreedays,data=x)))