Message-ID: <6CBC9BB4-8FE0-4B61-8912-19432B566BF8@comcast.net>
Date: 2013-12-16T15:49:47Z
From: David Winsemius
Subject: how to add a line in the graph?
In-Reply-To: <tencent_3BA8C4D2179533E50A5E6DDB@qq.com>
On Dec 15, 2013, at 4:46 AM, ???? wrote:
> t<--4:4
> y<-c(5,7,10,13,15,16,14,12,11)
> plot(t,y,type="l")
>
> how can i add a curve y=0.83*t-0.44*t^2 in the graph?
> [[alternative HTML version deleted]]
t<--4:4
y<-c(5,7,10,13,15,16,14,12,11)
plot(t,y,type="l", ylim=c(-4,16))
curve( 0.83*x-0.44*x^2 , add=TRUE, col="red")
--
David Winsemius
Alameda, CA, USA