R – Plots without titles/labels in R

chartsplotrstatistics

In R is there any way to produce plots which have no title and which use the space the title would otherwise have taken up?

In plot(), main, sub, xlab, and ylab all default to NULL, but this just leaves blank space where they would have been, ditto for setting them to ''. It would be nice if not including them meant that the entire plot space was utilized rather than leaving extra empty space on the edges. This is all especially relevant in printing plots to file devices like pdf(), png(), etc.

Best Solution

See tip 7 about adjusting the margins.

Excerpt:

To remove the space reserved for labels, use par(mar=...). For example

png(file="notitle.png",width=400, height=350)
par(mar=c(5,3,2,2)+0.1)
hist(rnorm(100),ylab=NULL,main=NULL)
dev.off()
Related Question