필터 지우기
필터 지우기

Enable datacursor for certain axes

조회 수: 1 (최근 30일)
Joe
Joe 2012년 7월 25일
I have a gui with two sets of axes. One of the axes displays an image and has an associated ButtonDownFcn to track clicks. The other axis has a plot, which I want to be able to use the datacursor on. Is there an easier solution than using window callbacks to change datacursor behavior depending on the mouse position? Anybody?

답변 (2개)

Tom
Tom 2012년 7월 26일
The datatip won't show up if you hide the axes handle,e.g.
AX(1)=subplot(2,1,1);
plot(rand(10,1))
AX(2)=subplot(2,1,2);
plot(rand(10,1))
datacursormode on
set(AX(2),'HandleVisibility','Off')
  댓글 수: 1
Joe
Joe 2012년 7월 26일
Thanks! I'm having problems with that, though. One issue is that I replot those axes and address them as handles.image. I tried setting handle visibility back on when I replot and then switching it back off, but now MATLAB just hangs up whenever I click the image. That may also have something to do with the fact that I have a callback tied to the image being displayed on those axes.

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


Walter Roberson
Walter Roberson 2012년 7월 26일
Sorry, no, datacursormode is a figure behavior.

카테고리

Help CenterFile Exchange에서 Interactive Control and Callbacks에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by