Reversing the y-axis values without reversing the image.
1 次查看(过去 30 天)
显示 更早的评论
Hi,
I would like to flip the y-axis values without flipping the image. Your help is much appreciated.
0 个评论
回答(3 个)
Ameer Hamza
2020-11-22
An easy solution will be just flip the labels. Run the following line
yticklabels(flip(yticklabels))
after creating the figure.
1 个评论
Ameer Hamza
2020-11-22
Can you explain what do you mean by "Though it flips the Y-axis values but does not start from X-axis"? Can you draw on this image to show the expected output?
Image Analyst
2020-11-22
After you display the image, try
axis xy
1 个评论
Image Analyst
2020-11-22
Did you try using YData in imshow():
yourImage = imread('peppers.png');
[rows, columns, numColorChannels] = size(yourImage);
imshow(yourImage, 'YData', [rows, 1]);
axis xy
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!