MATLAB Answers

Keyboard shortcut to move DataCursor tooltip to previous/next data point

16 views (last 30 days)
z8080
z8080 on 14 Oct 2017
Answered: Jaslyn Tan on 17 May 2019
Once I select a data point in my plot using the Data Cursor tool, it would be very useful to be able to switch back and forth between consecutive data points using the keyboard. It seems, however, that the arrow keys (and a few other keys I've tried) do not advance the DataCursor to the previous/next data point, as I hoped. Is there any keyboard shortcut that can be defined for this?
Running Matlab R2016a on Windows 7.
Many thanks!

  5 Comments

Show 2 older comments
z8080
z8080 on 15 Oct 2017
Funny: I created a simple test plot, and there the arrow keys do move the data cursor tooltip, but not in my original plot, which is made up of 60 subplots (each taking up a thin horizontal line); that plot also has a few lines drawn using the 'line' function, but still I don't understand why that means the data cursor should not be movable.
z8080
z8080 on 15 Oct 2017
Not by me! Typing the first command returns the lines below, and typing the second returns an error.
Line with properties:
Color: [0 0.4470 0.7410]
LineStyle: 'none'
LineWidth: 0.5000
Marker: 'o'
MarkerSize: 4
MarkerFaceColor: [1 1 1]
XData: 177972
YData: 0.5000
ZData: [1x0 double]

Sign in to comment.

Answers (1)

Jaslyn Tan
Jaslyn Tan on 17 May 2019
You are probably using 'brush' which is the first (and default) option in the large, red rectangle box. Switching to 'data tips' (second option from left, boxed in small red square) should allow you to toggle between data points using keyboard arrows. You have to mouse over that area to see the options. Hope this helps.Data Tips.jpg

  0 Comments

Sign in to comment.

Sign in to answer this question.