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?
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
See tip 7 about adjusting the margins.
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()
If you're willing to entertain an alternate plotting package, ggplot2 does this automatically when you set
NULL (and there is no plot title/
main by default). For simple plots, just
require(ggplot2) and replace
Really, ggplot2 is the most fun I've had with plotting in years and I can't resist the opportunity to evangelize it to everyone I meet. :-)