# NOT RUN {
plot(1:10, pch = 19, col = 'black')
oldPar = par()
par(omi = omiForSubFigure(0.6, 0.25, 0.8, 0.45, region = 'device'))
par(mar = c(0,0,0,0))
plot(1:10, pch = 19, col = 'red')
par(oldPar)
par(omi = omiForSubFigure(2, 6, 5, 10, units = 'data'))
par(mar = c(0,0,0,0))
plot(1:10, pch = 19, col = 'blue')
par(oldPar)
## Illustrates how the proportions line up:
plot(1:10, pch = 19)
par(xpd = NA)
oldPar = par()
## Show where the propotions are as a reference:
abline(v = convertUnits('proportion', seq(0, 1, by = 0.1), 'data',
region = 'device', axis = 'x'), lty = 2, col = 'red')
abline(h = convertUnits('proportion', seq(0, 1, by = 0.1), 'data',
region = 'device', axis = 'y'), lty = 2, col = 'red')
## Create a new sub-plot.
par(omi = omiForSubFigure(0.2, 0.2, 0.8, 0.8, region = 'device'))
plot(1:10, pch = 19, col = 'red')
highlightFigureRegion()
par(oldPar)
# }
# NOT RUN {
# }
Run the code above in your browser using DataLab