Data Cursor not moving upon pressing the arrow keys in scatter plot

14 visualizaciones (últimos 30 días)
z8080
z8080 el 24 de En. de 2020
Comentada: Adam Danz el 7 de En. de 2021
I find the Data Cursor in Matlab a very powerful tool when plotting data and debugging code. However, it often does not behave as expected. For instance, consider the following minimal example:
x = randn(1,10);
y = randn(1,10);
scatter(x,y)
If I click on a data point with the Data Cursor, and then press any of the arrow keys on my keyboard, the data cursor does not move between the different data points plotted, as would be expected, and as indeed happens in other of my scatter plots (with code too complex to paste here).
If I change the scatter to a plot, with data points not connected by a line,
plot(x,y, 'o')
then the Data Cursor moves again when pressing the arrows. However, the scatter function has features that the plot function does not have. I didn't find it written anywhere in matlab's documentation that data cursor does not work with 'scatter'.
Any ideas when/why this happens, would be really appreciated. I am using Matlab 2016a on Windows.
  1 comentario
Adam Danz
Adam Danz el 7 de En. de 2021
Keyboard control of datatips is not supported in scatter(). See this answer for a workaround using scatter.

Iniciar sesión para comentar.

Respuestas (0)

Categorías

Más información sobre Scatter Plots en Help Center y File Exchange.

Etiquetas

Productos


Versión

R2016a

Community Treasure Hunt

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

Start Hunting!

Translated by