interaction with data cursor in data inspector
이전 댓글 표시
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
답변 (1개)
Cam Salzberger
2020년 8월 20일
0 개 추천
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
fangfines
2020년 8월 21일
David Kröter
2021년 3월 2일
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
카테고리
도움말 센터 및 File Exchange에서 Marine and Underwater Vehicles에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!