【matlab程序】matlab使用箭头在图像上标注
clear;clc;close all;
x=0:1/10000:2*pi;
y=sin(x);
figure
plot(x,y,'LineWidth',2)
x_begin = 1;
x_end = 2;
y_begin = 0;
y_end = 0.2;
annotation('arrow',XY2Norm('X',[x_begin,x_end]),XY2Norm('Y',[y_begin,y_end]),'LineWidth',2,'Color','r');
text(1,-0.2,'这是正弦曲线','FontSize',15,'color','r')
set(gcf,'Position',[50 50 800 500],'color','w')
set(gca,'LineWidth',2,'FontSize',20)
title('matlab使用箭头在图像上标注','FontSize',20)
export_fig(['matlab使用箭头在图像上标注.png'],'-r300');