how to add a STAR or Triangle shape to plot simply without knowing their vertex?
170 次查看(过去 30 天)
显示 更早的评论
Hi
I have a contourf. I'd like to just add a simple Star or Triangular shape to certian location within the plot. I am thinking to use Patch() but patch still requires to provide the vertext of this Star or triangular shape in order to draw it. Is there a command to add this shape without knowing their vertex? Thanks
0 个评论
采纳的回答
Jonas
2021-7-15
编辑:Jonas
2021-7-15
smth. like that probably
Z = peaks;
contourf(Z); hold on;
plot(15,10,'rp','MarkerSize',15,'MarkerFaceColor','r')
3 个评论
Jonas
2021-7-16
hi roudan, you can show your code how you saved your handles. the following worked for me without problems:
Z = peaks;
contourf(Z); hold on;
mark=plot(15,10,'rp','MarkerSize',15,'MarkerFaceColor','r');
delete(mark)
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Polygons 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!