[R] Plotting text on a graph

From: Erin Hodgess <hodgess_at_gator.dt.uh.edu>
Date: Mon 23 Oct 2006 - 20:38:48 GMT


Hi Daniel:

Here is a sample code that I have used:

z1 <- rexp(100)
z2 <- rexp(100)
z3 <- rexp(100)

par(mfrow=c(2,2),oma = c(0, 0, 3, 0))
curve(dexp,from=0,to=5)
hist(z1,main="Size 5")
hist(z2,main="Size 15")
hist(z3,main="Size 30")

mtext("Densities", outer = TRUE, cex = 1.5)

And this will do the trick.

Hope this helps!

Sincerely,
Erin Hodgess
Associate Professor
Department of Computer and Mathematical Sciences University of Houston - Downtown
mailto: hodgess@gator.uhd.edu

Hi,  

I plotted 12 graphs on a page and output to a png file. I wanted to have an overall title for all 12 graphs. What command can I use to do this? Below is the code that plotted the 12 graphs in one page.  

# FM10 by Month/ Export the plot to Wash2005FM10.png

png(file="Wash2005FM10.png",bg="white")

par(mfrow = c(3,4))

# Plot 12 Month of OFM10, FFM10

for(i in 1:12) {

Temp <- subset (Wash2005, MM == i)

plot (Temp$FM10.1,
Temp$FM10,main=month.name[i],xlim=c(5,25),ylim=c(5,25))

}

text(10,10, "Overall Title") 'This will plot "Overall Title" at coordinate (10,10) on the last graph, and so it is not what I want.

dev.off()  

Thank you.  

Daniel Chan

Meteorologist

Georgia Forestry Commission

P O Box 819

Macon, GA

31202

Tel: 478-751-3508

Fax: 478-751-3465  

        [[alternative HTML version deleted]]



R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.

R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code. Received on Tue Oct 24 06:44:59 2006

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.1.8, at Mon 23 Oct 2006 - 21:30:13 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.