make sure plotting returns None if no plotting done