MATLAB MATLAB Multiple Data Cursors in Figure

Say I command the following simple script:

figure; plot([1:12],[1:12],[1:12],[4:15])'

1. How can I create a data cursor on one curve that automatically creates a data cursor at the same x-axis value for the other curve without having to manually create (Alt-Click, then line up) a second Datatip?

2. Is there a way to drag one Datatip left and right and have all other Datatips drag left and right by the respective amount (i.e. link the data cursors together by the x-axis)?

The reason I ask is because I have six different curves per subplot (of which I have 3) per figure (of which I have 12) and I would like to minimize the time spent creating and lining up all of the data cursors in each figure.

Feel free to answer one or both of the questions. I feel they are closely related, and if you know the answer to one, you may know the answer to the other - hence my including them in the same thread.

Wrichik Basu

Gold Member
2018 Award
This is difficult. Some websites are saying that you can do something with datacursormode. See here:
Here is one interesting Github file:

Want to reply to this thread?

"MATLAB Multiple Data Cursors in Figure" You must log in or register to reply here.

Physics Forums Values

We Value Quality
• Topics based on mainstream science
• Proper English grammar and spelling
We Value Civility
• Positive and compassionate attitudes
• Patience while debating
We Value Productivity
• Disciplined to remain on-topic
• Recognition of own weaknesses
• Solo and co-op problem solving