I have a series of 11 graphs with a common legend. Therefore, I am putting the 11 graphs in a matrix layout so they can all be seen at once and want to put the legend in the 12th space.
How can I create a legend as its own plot in the matrix?
jpeg("Yearly live carbon.jpg", width = 2268, height = 1620, units = "px", pointsize = 28, quality = 85, bg = "white",type = "windows")
layout(matrix(c(1,2,3,4,5,6,7,8,9,10,11,12), 3,4, byrow=TRUE))
# Have a loop here to generate the graphics
dev.off()
The matrix layout will be filled with graphs for plots 1 thru 11, and I am trying to put a common legend in plot number 12. How can I set the legend as it's own plot in this?
thanks.