Re: [R] little subplot in corner

2008-03-24 Thread Thomas Steiner
Wonderful, thanks a lot. I just have to call the plot first and then the rect (and then I can plot it again)... %D Have a nice day, Thomas __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide

Re: [R] little subplot in corner

2008-03-24 Thread Henrique Dallazuanna
Perhaps: set.seed(24032008) plot(rnorm(10),type="l",col="red") grid() front=c(0.5, .97, 0.5, .97) par(fig=front, new=T)#, bg="skyblue" does not work set.seed(24032008) x <- rnorm(4) plot(x,type="l",col="blue",xlab="",ylab="", bg="yellow") rect(par("usr")[1], par("usr")[3], par("usr")[2], par("usr"

Re: [R] little subplot in corner

2008-03-24 Thread Thomas Steiner
Henrique, Although your solution is perfect, I had later a problem with setting the background. Perhaps you know how to get this as well: set.seed(24032008) plot(rnorm(10),type="l",col="red") grid() front=c(0.5, .97, 0.5, .97) par(fig=front, new=T)#, bg="skyblue" does not work rec=c(par("usr")[1]

Re: [R] little subplot in corner

2008-03-20 Thread Greg Snow
-8111 > -Original Message- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] On Behalf Of Thomas Steiner > Sent: Thursday, March 20, 2008 9:04 AM > To: [EMAIL PROTECTED] > Subject: [R] little subplot in corner > > I want to draw a little subplot ("overvi

Re: [R] little subplot in corner

2008-03-20 Thread Thomas Steiner
perfect, exactly what I was looking for. Thanks a lot! many eggs to you... Thomas __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide c

Re: [R] little subplot in corner

2008-03-20 Thread Henrique Dallazuanna
I don't if is this what you want, but: plot(rnorm(100)) par(fig=c(0, 1/2, 0, 1/2), new=T) plot(seq(-2,2,length=300),dnorm(seq(-2,2,length=300)),type="l", axes = F, xlab="", ylab="") On 20/03/2008, Thomas Steiner <[EMAIL PROTECTED]> wrote: > I want to draw a little subplot ("overview") into my de

[R] little subplot in corner

2008-03-20 Thread Thomas Steiner
I want to draw a little subplot ("overview") into my detailed plot. It should be placed in say the top right corner and have the size of some legend (like legend(x="topright", inset=0.03, ...) #main plot plot(rnorm(100)) #give little density in corner plot(seq(-2,2,length=300),dnorm(seq(-2,2,lengt