如何在Matlab中绘制好看的箭头? [英] How to draw good looking arrows in Matlab?

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

问题描述

我一直试图在Matlab中绘制箭头,但它们看起来都很糟糕。
另外,我希望我的箭头是一个实心三角形,而不是V。



我尝试使用Matlab File Exchange上提供的软件包:箭头,箭头,arrow3,可能还有至少另一个。



我甚至尝试在Matlab图形编辑器中手动创建箭头,但是当我调整线宽时,箭头看起来像像这样:





我使用 注解 命令创建上面的箭头:

 注释(gcf,'arrow',[0.621875 0.457916666666667],... 
[0.205421152030217 0.40755429650614],...
'HeadLength',4, '线宽',5);

以下是试图使用 箭头 包可在这里:

I have been trying to draw arrows in Matlab in my figure but they all look terrible. Also, I want my arrowhead to be a solid triangle, not a V.

I tried using the packages available on the Matlab File Exchange: arrow, arrows, arrows3, and probably at least one other one.

I even tried manually creating an arrow in the Matlab figure editor, but when I adjust the line width, the arrow looks like this:

I used the annotation command to create the arrow above:

annotation(gcf,'arrow',[0.621875 0.457916666666667],...
                       [0.205421152030217 0.40755429650614],...
                       'HeadLength',4,'LineWidth',5);

Here's the result trying to use the arrow package available here: Arrow.m (notice how the bottom arrow head is not perpendicular to the line:

I even tried the following and here is the result below (notice the terrible looking arrowhead):

 figure
 plot(1:10, 1:10)
 annotation(gcf,'arrow',[0.621875 0.457916666666667],...
                        [0.205421152030217 0.40755429650614],...
                        'HeadLength',4,'LineWidth',5);

解决方案

I resorted to installing InkScape and drawing arrows in there. Nothing beat the simplicity and quality.

InkScape Website

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

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