frame function takes plotter as arg