This is my Processing template for new pen plotting projects. It gives me a flexible canvas that scales to fit my screen and has built-in functionality for saving SVG and PNG output.
GitHub repo:
https://github.com/cadin/plotter-canvas
0:00 Intro
0:29 Plotter Canvas Overview
4:20 Code Walkthrough
8:29 About Unit Scaling
11:12 Code Demo