imagesc is missing several rows of pixels when image has 1780 rows of pixel
4 ビュー (過去 30 日間)
古いコメントを表示
% Simple demo to reproduce the bug.
% Purpose: show 2000x300 image by imagesc with yticklabel,
% then do "Y-only" zoom for fast free-hand eye-check of data quality in flexible Y ranges.
% Problem: imagesc shows misalignment with yticklabel in large images (2000X300)
% when doing Y-only zoom to a very high level.
% this may indicate missing of rows of pixles?
N = 2000;
A = rand(N,300);
imagesc(A)
set(gca,'YTick', 1:N,'YTickLabel',cellfun(@num2str,num2cell(1:N),'uni',0));
zoom yon
% then scrool to see
Hi,I am using imagesc to present the matrix data and need to view the details by Y-only zoom. When the number of row is not high, e.g., 300, after Y-only zoom I could see a perfect match of row of pixels with a ytick labelled. However, when the row numer is much higher as 1700, after Y-only zoom in the y-tick is ok, but the row of pixels does not match, as shown in image, It seems that several rows of pixels are lost in total, thus ytick is more dense than pixel rows. Is there a way to solve this problem? Thanks.
6 件のコメント
DGM
2023 年 2 月 26 日
That's weird. Maybe there were some stale changes to the figure from it having been used prior. Even though I always clear an existing figure with clf before starting to use it, I find that doesn't always reset all the properties.
回答 (0 件)
参考
カテゴリ
Help Center および File Exchange で Data Exploration についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!