Create a new figure when using ButtonDownFcn
조회 수: 4 (최근 30일)
이전 댓글 표시
This is a follow up to my previous question: https://www.mathworks.com/matlabcentral/answers/409465-use-buttondownfcn-on-an-image
I was able to get the 'CurrentPoint' property of the axes of the figure I want to analyze. I then take the contents of CurrentPoint entries (1,1) and (1,2) (b/c my plot is 2d), convert them into "entry numbers", and use these numbers to reference the corresponding data entry in a data array in my possession. Now, I would like to plot the contents of that data entry, as well as the result of a mathematical function acting on those data values, each in their own figure. I had created 2 figures with titles, labels, etc within the function that I had intended to use as the ButtonDown function callback. My question is, how do I invoke the ButtonDownFcn now? I tried plot('ButtonDownFcn',@myfxn), but the result is:
Error using plot
Invalid first data argument.
Thanks in advance.
댓글 수: 0
답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Graphics Object Properties에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!