reverse Y axis with Imagesc()

Hi,
How to reverse the Y axis while displaying images with imagesc () function.. I have tried as follows, it does the job, however, reverses the image as well.
ax = gca;
imagesc(x,y,I');
set(gca, 'YDir','normal');

回答(1 个)

Set to reverse
set(gca, 'YDir','reverse');

3 个评论

Thanks.. I tried, with 'reverse' function no change at all.
Hi, I sorted it out. just added.
I1 = (fliplr(I));
Ah!! Y-axis is already reversed in imagesc. I think you wanted to flip x-axis?

请先登录,再进行评论。

类别

帮助中心File Exchange 中查找有关 Images 的更多信息

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by