Skip to content
Prev 178981 / 398503 Next

Conditional plot labels

Here is one example that moves the axes to the outer margins, play with the different settings to see the effects:

par(oma=c(3,3,3,3)+.1, mar=c(0,0,0,0)+0.1, mfrow=c(3,3))

for (i in 1:9) {
	plot( runif(10*i), runif(10*i), ann=FALSE, xlim=c(0,1), ylim=c(0,1),
		 xaxt='n', yaxt='n' )
	if( i %% 3 == 1 ) axis(2, outer=TRUE)
	if( (i-1) %/% 3 == 2 ) axis(1, outer=TRUE)
}

Hope this helps,