I want to plot a normal plot and a pie chart (plotrix package) side-by-side via par(mfrow = c(1, 2)
. The main titles of both graphics should have the same vertical position. However, by default both main titles have a different positioning.
Question: How could I ensure that the main title of the pie chart has the same vertical position as the title in a normal plot?
Consider the following reproducible example in R. "Lower main title" should be at the same height as "Main title with usual height".
# Set panel layout
par(mfrow = c(1, 2))
# Normal plot with normal height of main
plot(1:10, 1:10, main = "Main title with usual height")
# Load plotrix package for piecharts
library("plotrix")
# Pie chart with lower main title position
pie3D(1:5, labels = letters[1:5], main = "Lower main title")