Код: Выделить всё
library(TeachingDemos)
library(maptools)
data(wrld_simpl)
plot(wrld_simpl,border=NA,col='blue',axes=TRUE, xlim=c(100,130),
ylim=c(-40,30))
tmp <- subplot(
plot(wrld_simpl,border=NA,col='green',bg='white',axes=FALSE),
'bottomleft', size=c(2,1), inset=c(0.01,0.01))
tmp2 <- par('usr')
tmp3 <- subplot(
plot(wrld_simpl, border='red', axes=TRUE, xlim=c(95,105),
ylim=c(-5,5), bg='lightgrey'),
'topright', size=c(2,2))
par(xpd=TRUE) # reset clipping region
rect( tmp3$usr[1], tmp3$usr[3], tmp3$usr[2], tmp3$usr[4], border='orange' )
op <- par(tmp[c('plt','usr')])
rect( tmp2[1], tmp2[3], tmp2[2], tmp2[4], border='red' )
par(op)