finalized plot legend update