Create a new figure when using ButtonDownFcn
2 ビュー (過去 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 で Line Plots についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!