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 'automate' this
calculation
map("state", add=T)
map("state", region="ohio", fill=T, add=T)

*MY issue*: I can't figure out how to determine which values to specify for
par(usr=c(______))

I can get the values of the plot area using

par("usr")

But I don't know how to resize the second map or move it to another
location. When I adjust the values specified it just seems to stretch
the second map out.

Here is a basic idea of what I am trying to do

library(maps)
map('state', xlim = c(-86.5,-74), ylim= c(32,41.25), col = "white", fill =
T)

par(usr=c(-216, -66, 24, 144))
par(xpd=T)

map("state",  xlim = c(-105,-70), ylim= c(25,48), add = T)

---but I would like the US map to be larger and moved to the right

Thanks!

Carly

        [[alternative HTML version deleted]]

______________________________________________
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 commented, minimal, self-contained, reproducible code.

Reply via email to