How can I create an interactive vesion of IMAGESC that changes the colormap for the visible area?

조회 수: 1 (최근 30일)
I would like to use an interactive version of the IMAGESC function that would respond to zoom levels. The colormap should be rescaled over the range of only the visible area of the matrix, rather than wasting colors on values outside of the area shown as if IMAGESC were called again just on the visible area each time the display was zoomed in or out.

채택된 답변

MathWorks Support Team
MathWorks Support Team 2021년 2월 17일
편집: MathWorks Support Team 2021년 2월 17일
This can be done using a Zoom Object. You can create a zoom mode object with the ZOOM command and set the object's ActionPostCallback function. See the following documentation page for more information on this callback:
You may access the same page locally by typing the following at the MATLAB prompt:
doc zoom
The callback function can be used to set the axes' CLim property based on the minimum and maximum values of the currently visible area. See the attached example file demo_zoom.m. This example shows a basic implementation of how this could be done.
  댓글 수: 1
Rik
Rik 2021년 3월 4일
If you open it with a text editor, you can see it is simple m-code. They should remove the .exe from the filename and everything will be fine.

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

추가 답변 (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