MATLAB Legend Icon Colors
Mostra commenti meno recenti
This simplified example of my original problem also exhibits the same behavior. The legend is using the correct marker shapes, but not the correct color. It seems to use the color of the most recently created object.
EDIT: I am using MATLAB R2015b
figure;
P1 = scatter(4, 6);
hold on;
P2 = scatter(2, 9);
hold off;
set(P1, 'CData', [1 0 0]);
set(P2, 'CData', [0 0 1]);
set(P1, 'Marker', 's');
set(P2, 'Marker', '^');
legend('P1', 'P2');
xlim([0 10]);
ylim([0 10]);

Risposta accettata
Più risposte (1)
the cyclist
il 23 Mar 2016
0 voti
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!