Clean up formatting of plot function in plot3.R