MATLAB Answers

how to add a STAR or Triangle shape to plot simply without knowing their vertex?

8 views (last 30 days)
roudan on 15 Jul 2021
Commented: roudan on 16 Jul 2021
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

Accepted Answer

Jonas on 15 Jul 2021
Edited: Jonas on 15 Jul 2021
smth. like that probably
Z = peaks;
contourf(Z); hold on;
all markers can be found here, there are also triangles and hexagonal stars

Sign in to comment.

More Answers (0)




Community Treasure Hunt

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

Start Hunting!

Translated by