如何绘制箭头到在Matlab中的人物? [英] How to plot arrow onto a figure in Matlab?

查看:247
本文介绍了如何绘制箭头到在Matlab中的人物?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我知道有一个叫注释可以绘制箭头或双箭头的功能。但是注释只能在绘制归单位。例如:

I know there is a function named annotation can plot arrows or double arrows. But annotation can only plot in normalized unit. For example:

annotation('arrows',[x1 x2],[y1 y2])

下面,[X1,X2]应小于一的比例数

Here, [x1, x2] should be a ratio number less than one.

所以,我的问题是我怎么能绘制箭头与真正的价值,而不是一个标准值?

So, my question is how can I plot arrows with a true value rather than a normalized value?

我不知道是否有任何其他的功能可以解决这个或者是还有什么功能,我可以得到图的坐标值,这样我可以调整的真正价值成一个标准化的值。

I wonder if there is any other function can approach this or is there any function I can get the axis value of the figure so that I can adjust the true value into a normalized value.

推荐答案

我刚刚发现了这个方法,因为我不希望有归一化单位打扰。使用乳胶间preTER:

I've just discovered this method, since I don't want to have to bother with normalised units. Use the latex interpreter:

figure
plot([1:5],[1:5]*3,'.-')
%// Say I want to put an arrow pointing to the location, [3 9]    
text(2.94,8.3,'\uparrow','fontsize',20)
text(2.8,7.8,'point [3,9]')

要使箭头越长,使用较大的字体大小。

To make the arrow longer, use a larger fontsize.

赞成


  • 更容易,比使用归一化单位更快,更快

  • 不需要安装任何功能(对我们有好处,懒惰的人。)

  • 利用LaTeX的跨preTER,有一整套箭头(上,下,左,右等角度(见的Symbol列表

  • Easier, faster and quicker than using normalised units
  • Don't need to install any functions (good for us lazy people..)
  • making use of the LaTeX interpreter, there is a whole range of arrows (up, down, left, right and other angles (see Symbol list)

缺点


  • 肯定需要试错/调整来获得相对于POI的箭头的正确位置。

  • 有在箭头的长度
  • 控制有限
  • 某些乳胶命令不被跨preTER(BOO)的理解。

这篇关于如何绘制箭头到在Matlab中的人物?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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