Factor out into a function so we can create multiple plots per page.