|
本帖最后由 牛小贱 于 2014-5-26 15:54 编辑
When data cursor mode is enabled, you can
Click on any graphics object defined by data values and display the x, y, and z (if 3-D) values of the nearest data point.data cusor显示的是直角坐标系的坐标,如果想修改显示的值,可以尝试通过修改回调函数来实现,默认回调函数:
- function output_txt = myfunction(obj,event_obj)
- % Display the position of the data cursor
- % obj Currently not used (empty)
- % event_obj Handle to event object
- % output_txt Data cursor text string (string or cell array of strings).
- pos = get(event_obj,'Position');
- output_txt = {['X: ',num2str(pos(1),4)],...
- ['Y: ',num2str(pos(2),4)]};
- % If there is a Z-coordinate in the position, display it as well
- if length(pos) > 2
- output_txt{end+1} = ['Z: ',num2str(pos(3),4)];
- end
复制代码
|
评分
-
3
查看全部评分
-
|