Matlab 中的 annotation() 和 text() [英] annotation() and text() in Matlab

查看:23
本文介绍了Matlab 中的 annotation() 和 text()的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想知道 Matlab 中 annotation()text() 函数有什么区别?在什么情况下,其中一个比另一个更受欢迎?

I wonder what is the difference between annotation() and text() functions in Matlab? In what cases are one of them preferred over the other?

谢谢和问候!

推荐答案

TEXT 相对于轴定位文本.相比之下,ANNOTATION 位置与图形相关.注释不仅可以放置文字,还可以放置线条、形状、箭头等.因此,TEXT 将轴句柄作为参数(或 gca 用于当前轴),而 ANNOTATION 将图形句柄(或 gcf 用于当前图形).

TEXT positions text in relation to axes. In contrast, ANNOTATION position is figure-related. ANNOTATION can put on figure not only text, but lines, shapes, arrows, etc. Consequently, TEXT takes axes handles as an argument (or gca for current axes), and ANNOTATION takes figure handles (or gcf for current figure).

这篇关于Matlab 中的 annotation() 和 text()的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆