plot arrowhead

版本 1.0.0.0 (2.5 KB) 作者: Ohad Gal
Simple and SMALL code for arrowhead plot.
14.8K 次下载
更新时间 2003/5/19

查看许可证

% plot_arrow - plots an arrow to the current plot
%
% format: handles = plot_arrow( x1,y1,x2,y2 [,options...] )
%
% input: x1,y1 - starting point
% x2,y2 - end point
% options - come as pairs of "property","value" as defined for "line" and "patch"
% controls, see matlab help for listing of these properties.
% note that not all properties where added, one might add them at the end of this file.
%
% additional options are:
% 'headwidth': relative to complete arrow size, default value is 0.07
% 'headheight': relative to complete arrow size, default value is 0.15
% (encoded are maximal values if pixels, for the case that the arrow is very long)
%
% output: handles - handles of the graphical elements building the arrow
%
% Example: plot_arrow( -1,-1,15,12,'linewidth',2,'color',[0.5 0.5 0.5],'facecolor',[0.5 0.5 0.5] );
% plot_arrow( 0,0,5,4,'linewidth',2,'headwidth',0.25,'headheight',0.33 );
% plot_arrow; % will launch demo

引用格式

Ohad Gal (2024). plot arrowhead (https://www.mathworks.com/matlabcentral/fileexchange/3345-plot-arrowhead), MATLAB Central File Exchange. 检索来源 .

MATLAB 版本兼容性
创建方式 R12.1
兼容任何版本
平台兼容性
Windows macOS Linux
类别
Help CenterMATLAB Answers 中查找有关 Labels and Annotations 的更多信息
致谢

启发作品: CAD APPS, CADApps mechanics

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!
版本 已发布 发行说明
1.0.0.0

handle division by zero case,
fixed bug, which made the arrowhead flip at some angles