Re: [R] Identify function with matplot

From: Uwe Ligges <ligges_at_statistik.uni-dortmund.de>
Date: Fri 29 Jul 2005 - 19:31:39 EST

Hari Iyer wrote:

> Hello
> Is there a way to use the "identify" function with "matplot" ?

Not directly, but you can write a wrapper for the particular case as in:

sines <- outer(1:20, 1:4, function(x, y) sin(x / 20 * pi * y)) matplot(sines, pch = 1:4, type = "o", col = rainbow(ncol(sines)))

identifyMat <- function(x, ...){

   label <- paste(row(x), ", ", col(x), sep="")    identify(row(x), x, labels=label, ...) }
identifyMat(sines)

Uwe Ligges

> Thanks.
> Hari
>
> ______________________________________________
> R-help@stat.math.ethz.ch mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html



R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html Received on Fri Jul 29 19:36:32 2005

This archive was generated by hypermail 2.1.8 : Fri 03 Mar 2006 - 03:34:08 EST