Answers for "how to only add one legend in matlab"

C++
0

add manual legend matlab

h1=plot([1:10],'Color','r','DisplayName','This one');hold on;
h2=plot([1:2:10],'Color','b','DisplayName','This two');
h3=plot([1:3:10],'Color','k','DisplayName','This three');
legend([h1 h3],{'Legend 1','Legend 3'})
Posted by: Guest on September-18-2020

Browse Popular Code Answers by Language