Here is an example using the subplot function.
library(TeachingDemos)
map("state", region= "ohio", xlim=c(-85, -80), ylim=c(38, 42))
tmp <- subplot(map("state",add=TRUE), 'bottomright', type='fig',
size=c(0.2,0.2), inset=0.1)
op <- par(fig=tmp$fig)
map("state", region="ohio", fill=T, add=T)
par(op
Please don't post HTML email.. we don't necessarily see what you see when you
do that. Read the Posting Guide for more list etiquette.
Have you played with the "usr" coordinates? Have you read the help for the par
function?
The par(usr=...) call is telling base graphics what the x and y coordin
This is in reference to the post here by Ray Brownrigg:
http://r.789695.n4.nabble.com/inset-one-map-on-top-of-another-map-td3848752.html
using this code with the maps package:
map("state", region= "ohio", xlim=c(-85, -80), ylim=c(38, 42))
par(usr=c(-216, -66, 24, 144)) # you should be able to '
3 matches
Mail list logo