'Legend' Command shows wrong symbols (R2011b)
7 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Hello all,
I have had issues recently when trying to display a legend on a figure. To my knowledge, the command is formatted as:
legend('Re = 2000','Re = 3000','Re = 4000','Re = 5000','Re = 6000',0)
The legend displays properly, but the symbols used for each data set are not displayed correctly. In this instance, the symbols should be 'o','x','+','s', and 'h'. The legend shows up with the symbols 'o','o','x','+', and 'o'.
0 comentarios
Respuestas (1)
Razvan
el 13 de Feb. de 2012
The symbols are set in the plot commands, not in the legend command.
Check this example:
M = rand(6, 20);
plot(M(1, :), '-o'); hold all
plot(M(2, :), '-x');
plot(M(3, :), '-+');
plot(M(4, :), '-s');
plot(M(5, :), '-h'); hold off
legend({'Re = 2000','Re = 3000','Re = 4000','Re = 5000','Re = 6000'})
I hope this helps.
Razvan
0 comentarios
Ver también
Categorías
Más información sobre Legend en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!