How to fit the axes with the native resolution of the image?

조회 수: 4 (최근 30일)
John Doe
John Doe 2020년 5월 18일
댓글: John Doe 2020년 5월 18일
Hello everyone. I have a GUI where I am loading an image into the axes. I want the axes to wrap around the loaded image's native resolution, much like a MATLAB figure window would do.
How can I do that? Thanks in advance.

채택된 답변

Image Analyst
Image Analyst 2020년 5월 18일
truesize
Adjust display size of image
Syntax
Description
truesize(fig,[mrows ncols]) adjusts the display size of an image in a figure, fig, to the dimensions [mrows ncols], in pixels.
Also, see attached demo on zooming.
  댓글 수: 1
John Doe
John Doe 2020년 5월 18일
Thanks for the truesize command. Didn't know about that.
But I wanted to mean the axes ONLY to wrap around the figure, not the whole figure window. truesize is setting my whole GUI figure window to the figure size.

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

추가 답변 (0개)

카테고리

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

Community Treasure Hunt

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

Start Hunting!

Translated by