필터 지우기
필터 지우기

how to use handles on subplot?

조회 수: 11 (최근 30일)
nirit
nirit 2018년 8월 23일
댓글: Adam 2018년 8월 23일
hello. newbie on handles.
I have an image and 2 different algorithms, each resulting 2 different outputs, which mark pixels on the image. and I want to compare the 2 outputs visually. so I want to plot on one figure 2 subplots - each containing the same image- say frame0. when the keyboard is pressed (for example the right arrow) I want both subplot to show frame1.. and so one. the only different thing between the two subplot is that subplot(1) shows the output of alg1, and ubplot(2) shows the output of alg2. how can this be done smartly using handles?
thanks.
  댓글 수: 1
Adam
Adam 2018년 8월 23일
hAxes(1) = subplot( 1, 2, 1 );
hImage(1) = imagesc( hAxes(1),... );
hAxes(2) = subplot( 1, 2, 2 );
hImage(2) = imagesc( hAxes(2),... );
Then you can just update the 'CData' property of hImage(1) and hImage(2) to whatever you want from your two algorithms.

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

답변 (0개)

카테고리

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

Community Treasure Hunt

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

Start Hunting!

Translated by