Removing space in paneled graphics in R

I want to make four plots in one column on a page (mfrow = c(4, 1)), and the default space is much bigger than I want.

The issue in more depth

I need the x-axis scale and label only on the last of the plots, and I'm not using the mains or subs. In this example I put text in them to generate that they're part of the problem, but in the graph that led me to this issue, they're set to the empty string.

There's also some other space between the plots, and I don't need that.

Here's an example of a graphic with more space than I want.

Graphic with too much space in the various places discussed above

How can we do this?

Make the image bigger

Because the issue is mostly with the text labels, I can resolve this by simply increasing the height of the image; this makes the text so small in comparison to the rest of what's going on that it is insignificant. But then I can't read the text that I actually do want to see.


Travis Hinkelman supposedly addressed this issue by setting omi and mai arguments to par. That didn't work for me.

Use something other than base graphics.

This is easier in lattice, for example. But then I'd have to use lattice. This is a good idea in general, but I still don't want to do it.

Make text smaller

I wound up setting the pointsize parameter to png to be really small, and setting cex to be really big whenever I wanted to be able to read text.