Skip to content
Back to formatted view

Raw Message

Message-ID: <530261.70363.qm@web56008.mail.re3.yahoo.com>
Date: 2009-11-20T23:06:58Z
From: Jason Rupert
Subject: How to add a top level title to multiple plots

How can I add an overall plot title to these four plots? 

I would like to have something that says, "Distribution Comparisons":


par(mfrow = c(2, 2))
# Plot 1
plot(rnorm(10),type="l",col="red")
title(main = list(paste("Normal"),
????????????????????????? col="black", cex = 1.0))


# Plot 2
plot(rpois(10, 4),type="l",col="blue")
title(main = list(paste("Poison"),
????????????????????????? col="black", cex = 1.0))


# Plot 3
plot(rnbinom(10, mu = 4, size = 100),type="l",col="green")
title(main = list(paste("Binomial"),
????????????????????????? col="black", cex = 1.0))

# Plot 4
plot(runif(10),type="l",col="black")
title(main = list(paste("Uniform"),
????????????????????????? col="black", cex = 1.0))


Thanks again for any feedback and insights.