interaction with data cursor in data inspector
2 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
say i have the following data in time series:
t1: v1, (x1a, x1b, x1c, x1d...), (y1a, y1b, y1c, y1d...)
t2: v2, (x2a, x2b, x2c, x2d...), (y2a, y2b, y2c, y2d...)
t3: v3, (x3a, x3b, x3c, x3d...), (y3a, y3b, y3c, y3d...)
...
ti: vi, (xia, xib, xic, xid...), (yia, yib, yic, yid...)
...
tn: vn, (xna, xnb, xnc, xnd...), (yna, ynb, ync, ynd...)
i can get a time plot of (tn,vn) in data inspector, buy when i drag the data cursor to (ti,vi), is that possible i get a sync xy plot of (xi....,yi....)?
i think if i could access the position api of the data cursor, then it is possible to set the xy data of the xyplot.
but if this is possible and could this run as a interactive mode (e.g., the api could run background then when i release to drag the cursor, the xyplot automatic sync to that (xi...,yi...) at (ti) )?
thanks very much
0 commentaires
Réponses (1)
Cam Salzberger
le 20 Août 2020
It sounds like you want to have have two plots, one time-domain plot that you interact with using the data cursor, and one x-y plot that gets updated based on where the data cursor is currently located.
I haven't personally tried it, but you could possibly create a custom UpdateFcn callback when calling "datacursormode", pass it the handles to the x-y plot that you need, and have that update the x-y plot based on the currently clicked position. It would also be defining what the data tip would look like, but that's not the main focus here.
-Cam
2 commentaires
David Kröter
le 2 Mar 2021
I'm facing exactly the same task as you. Did you find a solution then? Would be great if you shared it with me ;-)
Best,
David
Voir également
Catégories
En savoir plus sur Test and Measurement dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!