On 08/23/2010 09:52 PM, Jordan Ouellette-Plante wrote:


Hi,

I am using the Sciplot package to graph barplots. Since I put 4 barplots per 
page and that the legends are always the same, I would like to find a way to 
have only one legend per page. Also, I would like it to be centered in the 
middle of the page. I tried locator() without success.

Hi Jordan,
Don't know about Sciplot, but you can do something like this with:

par(mfrow=c(2,2))
par(mar=c(6,4,4,2))
barplot(...)
barplot(...)
par(mar=c(5,4,6,2))
barplot(...)
barplot(...)
par(xpd=TRUE)
# place the legend in the space in the middle
legend(...)
par(xpd=FALSE)

Jim

______________________________________________
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.

Reply via email to