2015-12-25 83 views

回答

3

沒有什麼比這更簡單,只需使用fillannotation

figure; 
hold on; 
axis off; 

% Strunk 
fill([3,3,4,4],[0,1,1,0],[139,69,19]./255,'LineStyle','none') 

% Tree 
x = [1,6,5,5.5,4.5,5,3.5,2,2.5,1.5,2,1] 
y = [1,1,3,3,5,5,8,5,5,3,3,1] 
fill(x,y,'g','LineStyle','none') 

% Decoration 
annotation('ellipse',[0.3,0.5,0.05,0.05],'Color','red','FaceColor','red') 
annotation('ellipse',[0.6,0.3,0.05,0.05],'Color','red','FaceColor','red') 
annotation('ellipse',[0.55,0.6,0.05,0.05],'Color','red','FaceColor','red') 

result