Effacer les filtres
Effacer les filtres

Create a new figure when using ButtonDownFcn

4 vues (au cours des 30 derniers jours)
J.S.
J.S. le 10 Juil 2018
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.

Réponses (0)

Catégories

En savoir plus sur Graphics Object Properties dans Help Center et File Exchange

Produits


Version

R2015b

Community Treasure Hunt

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

Start Hunting!

Translated by