legend plotting error messages