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
Stephen Eglen wrote:> 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, StepehnBy specifying argument "main", as mentioned in ?hist ? hist(apply(cbind( runif(1000), runif(1000)), 1, function(x) {sqrt(sum(x^2))}), main="Anything") Uwe Ligges
Did you try:
hist(apply(cbind( runif(1000), runif(1000)), 1,
function(x) {sqrt(sum(x^2))}), main="adsf")
This worked for me in both S-Plus 6.1 and R 1.7.1.
hope this helps. spencer graves
Stephen Eglen wrote:> 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
>
> ______________________________________________
> R-help at stat.math.ethz.ch mailing list
> https://www.stat.math.ethz.ch/mailman/listinfo/r-help