我有一个带有多个 plot 的轴。我想知道是否有一种方法可以使用数据光标模式检测我喜欢的情节。我已经有一个回调,它给出了我喜欢的值。
最佳答案
作为documented in matlab , datacursormode
可以输出光标所在的目标行(或任何图形对象)的句柄。以下代码中的属性 Target
用于使绘图更粗。
dcm_obj = datacursormode(fig); %enable data cursor mode
cursor_info = getCursorInfo(dcm_obj); %get the properties
set(cursor_info.Target,'LineWidth',2) %the target handle is Target
关于matlab - 在matlab中检测轴中的点击线,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/18482693/