Matlab作图后,标记多个数据点
(2013-07-03 11:27:46)
标签:
教育 |
分类: Matlab学习 |
Matlab作图后,标记多个数据点
请问:用data cursor怎样标注多点的坐标值(在同一张图中同时显示)?谢谢在要标注的图上点data cursor,要标注新的点就alt+click或者在图上右键->creat new
datatip
问:有没有什么命令可以 create new datatip啊 不想用右键 想直接调用命令啊
答:
用datacursormode就可以创建新的datatip。具体使用看看help文件。
Site:http://www.ilovematlab.cn/thread-59660-1-1.html
另外可以参考:http://blog.sina.com.cn/s/blog_4d633dc70100phl5.html
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
这是从别人那转来的,我的例子在http://hi.baidu.com/aragon2/blog/item/d551b79221edbc99a877a433
由于之前的不认真,少看了一篇help导致未能利用data cursor获取guide 中axes中对象的坐标,用ginput代替,很是蹩脚。现在终于吃透data cursor。总结下来,助同道人一臂之力!
先看help里面有关文章。第一篇:介绍data cursor是什么,及都有哪些功能。
Data Cursor (help 中搜索关键字)— Displaying Data Values Interactively
What Is a Data Cursor?
Enabling Data Cursor Mode
Display Style — Datatip or Cursor Window
Selection Style — Select Data Points or Interpolate Points on Graph
Exporting Data Value to Workspace Variable
第二篇:在MATLAB新版本里用户可定制data cursor功能
Data Cursor Text Can Now Be Programmatically Modified
You can now easily customize the text of datatips. The datacursormode function lets you specify the contents and formatting of text displayed by the data cursor tool. When the data cursor tool is active, you can use its context (right-click) menu to edit or specify the text update function that MATLAB executes to display datatips. For more information, see Data Cursor — Displaying Data Values Interactively in the MATLAB Graphics documentation and datacursormode in the MATLAB Function Reference documentation.
第三篇:核心部分:如何在自己的程序中使用及定制data cursor功能。
datacursormode(help 中搜索关键字)
Enable or disable interactive data cursor mode
GUI Alternatives
Use the Data Cursor tool to label x, y, and z values on graphs and surfaces. For details, see Data Cursor — Displaying Data Values Interactively in the MATLAB? Graphics documentation.
中文翻译部分之后附上!

加载中…