Connecting vertices while drawing a filled polygon using patch

12 vues (au cours des 30 derniers jours)
cdob
cdob le 4 Juil 2016
I am attempting to draw multiple filled polygons using patch. If I increase the edge width, the polygons do not look closed anymore -- The end of the last edge is noticeably squared off. Is there a way to make the last vertex look connected with thick edges?
For a triangle, my code looks something like
patch('Faces',linspace(1,3,3),'Vertices',v,'FaceColor',[1,1,1],'linewidth',A);
in which A is an integer and v is a matrix of x and y coordinates for three vertices. I have also tried using [linspace(1,3,3),1] in lieu of linspace(1,3,3), and using XData and YData instead of Faces and Vertices.
Any advice would be greatly appreciated!

Réponses (0)

Catégories

En savoir plus sur Triangulation Representation dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by