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

Henrique Dallazuanna wwwhsd at gmail.com
Sun Mar 9 16:08:59 CET 2008


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



More information about the R-devel mailing list