I have a 2 by 2 plots per page (4 plots/page) for total 12 pages (48 IDs) generated by the below example codes. How do I specify a title at the top center of each page and add a legend in the middle center of each page. I know mtext can add title and legend can add legend, but my problem is how to add them to each page (12 pages) not each plot (48 plots, 4 plots/page).
Thanks but this is not what I want. basically, I need add title and legend for 12 pages, each page has four plots from for loop, and each page need has title and legend. you only generate one page, and it is easy to add title and legend on only one page containing four plots.