Dear Steve, Try
legend("topright", title="Land Use Type", cex=0.75, pch=16, col=c("red", "green"), legend=c("Urban", "Rural"), ncol=2) I hope this helps, John ------------------------------ John Fox, Professor Department of Sociology McMaster University Hamilton, Ontario, Canada web: socserv.mcmaster.ca/jfox > -----Original Message----- > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On > Behalf Of Steve Murray > Sent: September-23-08 12:57 PM > To: r-help@r-project.org > Subject: [R] Creating a Legend > > > Dear all, > > I'm trying to create a legend for my graph. I hope to have the title as "Land > Use Type" and the two elements being "Urban" and "Rural" with a red point and > green point respectively. So far I have the following command, but obviously > it isn't correct: > > > legend("topright", title="Land Use Type", cex=0.75, pch=16, > col="red","Urban"&"green","Rural", ncol=2) > > > As you can see, I'm a bit confused as to how to deal with the point colours > and associated text. > > Also, how would I make the associated text ("Urban" and "Rural") smaller than > the title? > > > Many thanks for any suggestions! > > Steve > > _________________________________________________________________ > Discover Bird's Eye View now with Multimap from Live Search > > ______________________________________________ > R-help@r-project.org 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@r-project.org 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.