Many legend on a figure
Show older comments
Hello ,
I would like to put 3 legend and 3 curves on the same figure, I tried this:
figure(1)%
plot(t,I(:,2),'b','linewidth',1.5);grid on
legend('ids');
xlabel('time[sec]');
ylabel('Courant ids');
hold on
plot(t,I(:,3),'r','linewidth',1.5);grid on
legend('iqs');
xlabel('time[sec]');
ylabel('Courant iqs');
hold on
plot(t,I(:,4),'g','linewidth',1.5);grid on
legend('if');
xlabel('time[sec]');
ylabel('Courant if');
but it does not work.
Do you have a solution ?
3 Comments
Guillaume
on 26 Feb 2020
Warning: from previous behaviour by the OP, this question may get edited/spam bombed to remove useful content once it's answered.
Jeremy
on 26 Feb 2020
Why do you want separate legends though? You can have one legend statement at the end with all 3 linestyles described
David Hastana
on 26 Feb 2020
Answers (1)
Walter Roberson
on 26 Feb 2020
1 vote
Why should anyone answer this question when it is almost certain that you will attempt to get rid of the question afterwards?
1 Comment
David Hastana
on 26 Feb 2020
Categories
Find more on Legend in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!