필터 지우기
필터 지우기

Label drag and drop on plot not working the same between MATLAB versions

조회 수: 3 (최근 30일)
Prof. X
Prof. X 2021년 4월 2일
댓글: Prof. X 2021년 4월 5일
I am updating a large MATLAB code from 2013b to run on 2020b. I have simplified and attached a section of it so you can just call the function to show the area of interest. The code allows you to drag and drop labels across a plotted line. It works great in 2013b but something has changed since then, and I can't figure out what is happening. I can't get it to generate errors or respond to figure out what is going on. If someone could point out the issue, that would be very helpful.
  댓글 수: 1
DGM
DGM 2021년 4월 2일
편집: DGM 2021년 4월 2일
Not sure yet, but the example works in R2009b and fails in R2015b. There was a quite a bit of stuff changed in 2014. It seems like the CBF aren't running at all, but every now and then I can manage to get them to fire. Strange.

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

채택된 답변

DGM
DGM 2021년 4월 2일
Ah. Figured it out. Set the pickableparts property of the labels.
te = text(xe,ye,['_{End}'],'rotation',45,'parent',ax,'hittest','off',...
'userdata',pe,'color',[0 .7 0],'tag','Testpoint','pickableparts','none');
  댓글 수: 1
Prof. X
Prof. X 2021년 4월 5일
That's it! I appreciate you helping me out! Read your profile, you belong here. Have a great day!

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

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Graphics Object Programming에 대해 자세히 알아보기

제품


릴리스

R2020b

Community Treasure Hunt

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

Start Hunting!

Translated by