From wwwhsd at gmail.com  Sun Mar  9 16:08:59 2008
From: wwwhsd at gmail.com (Henrique Dallazuanna)
Date: Sun, 9 Mar 2008 12:08:59 -0300
Subject: [Rd] [patch] add=TRUE in plot.default()
In-Reply-To: <20080309031119.GC23544@econ.upenn.edu>
References: <20080309031119.GC23544@econ.upenn.edu>
Message-ID: <da79af330803090808udf285ffqa0bbaac5bc5f9a99@mail.gmail.com>

I think you can use par(new = T) here:

f <- function(x) x^2
X <- seq(0, 1, by=1/4)
plot(f, col="blue")
par(new = T)
plot(X, f(X), col="red", type="l", xlab="", ylab="")

On 09/03/2008, Andrew Clausen <clausen at econ.upenn.edu> wrote:
> Hi all,
>
> As long as I've used R, add=TRUE hasn't worked in contexts like this:
>
> 	f <- function(x) x^2
> 	X <- seq(0, 1, by=1/4)
> 	plot(f, col="blue")
> 	plot(X, f(X), col="red", type="l", add=TRUE)
>
> I attached a fix for version 2.6.2.
>
> Cheers,
> Andrew
>
>


-- 
Henrique Dallazuanna
Curitiba-Paran?-Brasil
25? 25' 40" S 49? 16' 22" O



[Rd] [patch] add=TRUE in plot.default()
Henrique Dallazuanna