Use the returned handles of the text/line objects to clear/delete those unwanted.
Or create the cell array of strings for those wanted specifically and pass to legend initially
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!