How do I prevent the deformation of an image in the axes?
2 次查看(过去 30 天)
显示 更早的评论
I am using the imread() and image() functions to read and display the image, but it keeps deforming the image because the axes size (square) hasn't the same dimensions as the image. It is important that I use axes for other functions.
This is the code I already have:
if true
[filename,pathname] = uigetfile({'*.jpg';'*.JPEG';'*.GIF';'*.png'}, 'File selector');
image(imread([pathname filename]));
end
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/167877/image.jpeg)
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/167885/image.png)
0 个评论
采纳的回答
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Subplots 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!