[R] little subplot in corner

Greg Snow Greg.Snow at imail.org
Thu Mar 20 19:23:39 CET 2008


Look at the subplot function in the TeachingDemos package (the
cnvrt.coords function in the same package can be used to help in finding
coordinates to place the plot).

Hope this helps,

-- 
Gregory (Greg) L. Snow Ph.D.
Statistical Data Center
Intermountain Healthcare
greg.snow at imail.org
(801) 408-8111
 
 

> -----Original Message-----
> From: r-help-bounces at r-project.org 
> [mailto:r-help-bounces at r-project.org] On Behalf Of Thomas Steiner
> Sent: Thursday, March 20, 2008 9:04 AM
> To: r-help at stat.math.ethz.ch
> Subject: [R] little subplot in corner
> 
> 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,length=300)),type="l")
> 
> I don't want something like par(mfrow=c(1,2)) as this gives 
> subplots of equal size.
> I saw that gridBase is very flexible, but could not find a 
> suitable example.
> 
> Thanks for help,
> Thomas
> 
> ______________________________________________
> R-help at 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 commented, minimal, self-contained, reproducible code.
> 



More information about the R-help mailing list