I run
loglog(x,y);
legend(\'First script\');
from the first script.
Then, hold on;
.
I run a similar second script.
I see two g
The simplest way is:
hold all;
p1=plot(1:10,1:10);
legend(p1,'1'); % in this way plot(x,y) is saved as variable p1 with name '1'
p2=plot(1:10,11:20); % different data set
legend(p2,'2');
legend(gca,'off');
legend('show');
This is connection of few methods, it's very simple and it could be use everywhere.