Last chance! 50% off unlimited learning
Sale ends in
plotInset(xleft, ybottom, xright, ytop, expr,
mar=c(2, 2, 1, 1),
debug=getOption("oceDebug"))
"bottomleft"
, to
put the inset there. Eventually, other positions may be added.)inset=TRUE
to
prevent the inset diagram from occupying the whole device width. After
plotInset()
has been called, any further plotting will take place
within the inset, so it is essential to finish a plot before drawing an
inset.library(oce)
## power law in linear and log form
x<-1:10
y<-x^2
plot(x, y, log='xy',type='l')
plotInset(3, 1, 10, 8,
expr=plot(x,y,type='l',cex.axis=3/4,mgp=c(3/2,1/2,0)),
mar=c(2.5,2.5,1,1))
## CTD data with location
data(ctd)
plot(ctd, which="TS")
plotInset(29.9, 2.7, 31, 10,
expr=plot(ctd, which='map', coastline="coastlineWorld", span=5000, mar=NULL, cex.axis=3/4))
Run the code above in your browser using DataLab