[R] embedding plots

Jim Lemon jim at bitwrit.com.au
Sat Oct 13 11:08:00 CEST 2007


Josue G. Martinez wrote:
> Hello!
> 
> I am trying to embed a plot of a curve(say x^2) on a matrix that
> I am viewing using the image(matrix) command.
> 
> I was wondering if someone could give me some idea
> of how to do this.
> 
Hi Jose,
This may be way off what you want, but:

testmat<-matrix(rnorm(100),nrow=10)
image(testmat)
x<-seq(0,1,by=0.01)
lines(x,x*x)

Jim



More information about the R-help mailing list