A simple issue with legend
15 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
Hello,
I have a really simple question. To my surprise, I am could not help it (I have no idea !!!). When I type
x1=linspace(0,2*pi,1000);y1=sin(x1);y2=cos(x1);h1=plot(x1,y1,'-k');hold on;
plot(x1,0.*x1,'-k');hold on;h2=plot(x1,y2,'-k');legend([h1 h2],{'a','b'});
Then I get the following error message
Invalid argument. Type 'help legend' for more information.
I tried legend([h1 h2],['a','b']); which also does not work.
Sorry to bother you for this, thanks in advance!
5 Commenti
Risposte (0)
Vedere anche
Categorie
Scopri di più su Legend in Help Center e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!