update plot legend and safe in config