[R] Default title for hist assumes name is short

Stephen Eglen stephen at inf.ed.ac.uk
Sun Jul 27 16:21:56 CEST 2003


On the following plot:

hist(apply(cbind( runif(1000), runif(1000)), 1,
  function(x) {sqrt(sum(x^2))}))

the title is three lines long and so has "Histogram of " at the start
of each line of the title.  This is because the definition of main in
hist.default is main = paste("Histogram of", xname).  Is there an easy
way of changing the default for main so that it only writes "Histogram
of" once?

Thanks, Stepehn




More information about the R-help mailing list