is it a bug?
Mostra commenti meno recenti
The code below
(i) does not produce an error message about not matching x and y; it can be explained by implicit expansion in plot();
(ii) produces 100 legends; this I cannot explain.
x=1:100;
y=1;
plot(x,y,'DisplayName','a bug'),
legend('-DynamicLegend'),
Risposta accettata
Più risposte (1)
Bruno Luong
il 11 Set 2019
Modificato: Bruno Luong
il 11 Set 2019
1 voto
No it's not a bug: from PLOT doc
- If one of X or Y is a scalar and the other is either a scalar or a vector, then the plot function plots discrete points. However, to see the points you must specify a marker symbol, for example, plot(X,Y,'o').
You get really 100 points plotted.
Categorie
Scopri di più su Legend in Centro assistenza e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!