Refactor frametools.plot_frame

This consolidates a bit of repeated code from a couple of places into a single function.