factor out format_plot for common labels and axes formatting