Overlay imagesc with crosses
18 ビュー (過去 30 日間)
古いコメントを表示
Hi,
I wonder if it is possible to add crosses at some locations of an imagesc plot, like in the picture below, but with crosses that have the same size as the rectangles containing them?
All help appreciated,
Sylvain
Code used
im=imagesc(magic(3))
hold on
plot(2,2,'marker','x','MarkerSize',20,'Color','white')
0 件のコメント
回答 (1 件)
Walter Roberson
2016 年 3 月 8 日
On my system, with the default figure size, it came out as
im=imagesc(magic(3)); axis image; hold on
plot(2,2,'marker','x','MarkerSize',165,'Color','white')
However, if there were any kind of resizing, the marker would stay the same size on the screen rather than resizing with the box. It is therefore better to draw the lines, such as
plot([1.5 2.5 nan 2.5 1.5], [1.5 2.5 nan 1.5 2.5],'Color','white')
0 件のコメント
参考
カテゴリ
Help Center および File Exchange で Graphics Performance についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!