Validation routine for plotting