Can I set MarkerFaceColor to part of the data points?
4 次查看(过去 30 天)
显示 更早的评论
plot(1:10,1:10,'s')
Can I set MarkerFaceColor to red for point 1,2,3 while leave the other points unchanged?
I tried in interactive figure editor, it seems this is impossible.
0 个评论
采纳的回答
Star Strider
2020-12-8
Yes!
figure
plot(1:10, 1:10, 's')
hold on
plot((1:3), (1:3), 'sr','MarkerFaceColor','r')
hold off
.
9 个评论
Walter Roberson
2020-12-8
Ah, on desktop changing the MarkerHandle.FaceColorData to a 4 x N uint8 array gives a warning about wrong data. If you change it to a 4 x 1 uint8 array, then it does affect what is drawn.
MATLAB Online did not give me the warning message, but ignored the 4 x N data anyhow.
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Annotations 的更多信息
产品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!