added routines to rotate plots for quality control