Set y axis of image in imshow at the bottom without flipping the image

조회 수: 19 (최근 30일)
Alfonso
Alfonso 2018년 6월 16일
댓글: Ignacio Barranco Granged 2018년 11월 17일
At the moment when I display the image with imshow the y axis are logically set with the origin at the top. I would like to know if there is a way of setting the origin at the bottom but without flipping the image. If I use
set(gca,'YDir','normal');
The origin is at the bottom but the image is flipped.
I am using ecography images, so I can't use imagesc.
Thanks in advance.

답변 (1개)

Image Analyst
Image Analyst 2018년 6월 16일
I don't understand what you want. Do you have tick labels but want the tick labels flipped but the image not flipped? If so use yticklabels()
grayImage = imread('cameraman.tif');
imshow(grayImage);
axis on;
[rows, columns, numberOfColorChannels] = size(grayImage)
yTickNumbers = rows - yticks
for k = 1 : length(yTickNumbers)
ytl{k} = sprintf('%3d', yTickNumbers(k));
end
yticklabels(ytl)
  댓글 수: 3
Alfonso
Alfonso 2018년 6월 16일
Never mind, already found the solution
Ignacio Barranco Granged
Ignacio Barranco Granged 2018년 11월 17일
Could you share the solution you found?

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 Images에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by