Skip to content

How to plot a small figure in a bigger one???

1 message · Paul Murrell

#
Hi
jzhang10 wrote:
There are a number of ways to do this in R;  some pointers to get you 
started ...

(i)  par(new=TRUE) allows you to overlay several plots on the same page
(ii) par(fig) and par(plt) provide fine control over where a plot 
appears on a page
(iii) accurately locating subplots within a bigger plot may require some 
conversions between coordinate systems;  par("usr"), par("plt"), ... can 
be used to obtain information on current coordinate systems
(iv) you can have all the transformations done for you, by using the 
grid package to create viewports and the gridBase package to align them 
with a bigger plot - see the recent R News article "Integrating grid 
Graphics Output with Base Graphics Output" 
(http://cran.stat.auckland.ac.nz/doc/Rnews/Rnews_2003-2.pdf)

Paul