Skip to content
Prev 308494 / 398506 Next

how can I make a legend that applies for all the barplots in one same page?

On 10/20/2012 06:22 AM, Yakamu Yakamu wrote:
Hi Yayu,
First, leave enough space below your plots, then:

# allow the legend to display outside the plots
par(xpd=TRUE)
# work out where you want the legend in the user coordinates
# of the _last_ plot displayed
legend(x,y,...)
par(xpd=FALSE)

Jim