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 件)

Ameer Hamza
Ameer Hamza 2020 年 10 月 2 日

0 投票

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

3 件のコメント

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

サインインしてコメントする。

カテゴリ

ヘルプ センター および File ExchangeImages についてさらに検索

質問済み:

2020 年 10 月 2 日

コメント済み:

2020 年 10 月 2 日

Community Treasure Hunt

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

Start Hunting!

Translated by