You can use the mtext() function of R to write a common title for the plot. This function writes text into one of the four margins of a plot.
You can choose the side of the text using the argument 'side' (1=bottom, 2=left, 3=top, 4=right).
Here is an example:
attach(mtcars)
par(mfrow=c(1,2))
plot(wt,mpg)
plot(wt,disp)
mtext("Common title (Scatterplot)", side = 3, line = -2, outer = TRUE)
In this code, I am writing the plot's title on top (side=3). The code will use the outer margin (outer=TRUE) if available, and the title should be written on margin line -2 (line=-2).
The output of the above code is as follows:
