回复: [求助]如何画出带箭头的线段啊
用下面代码即可:
annotation('arrow',[0.2 0.8],[0.1 0.1],'LineStyle','-','color',[1 0 0]);
annotation('arrow',[0.2 0.8],[0.3 0.3],'LineStyle','-','color',[1 0 0],'HeadStyle','plain');
annotation('arrow',[0.2 0.8],[0.5 0.5],'LineStyle','-','color',[1 0 0],'HeadStyle','cback3');
annotation('doublearrow',[0.2 0.8],[0.7 0.7],'LineStyle','-','color',[1 0 0],'HeadStyle','cback3');
可以修改各种属性,包括箭头类型
|