Alex Rivera | Logout

Plots without titles/labels in R

Asked 2009-04-10T02:32:21.373
27

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.

Edit
Report

1 Answer

5

With lattice, it's just a matter of setting the xlab, ylab, and main arguments to NULL:

library(lattice)
bwplot(rnorm(100),xlab=NULL,ylab=NULL,main=NULL)
answered 2009-07-22T15:26:31.303

Your Answer