
How to use patch/fill on a polarplot
19 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Jakob Sievers
el 21 de Mzo. de 2019
Respondida: Divyajyoti Nayak
el 18 de Jun. de 2025
Hi all
I can't seem to get this right, so I figure I better ask someone with more experience:
How do I use patch/fill to fill in a polygon in a polarplot setting?
Based on the example listed in the help for polarplot: How do I fill in this triangle with e.g. the color red?
t = 0 :pi/1.5: 2*pi;
pp=polarplot(t, sin(2*t).*cos(2*t), '--r');

0 comentarios
Respuesta aceptada
Divyajyoti Nayak
el 18 de Jun. de 2025
From MATLAB R2025a, the 'patch' function now works on polar axes. Here's some sample code for it and the documentation to help out:
clc
clear
p = polaraxes;
r = [0;1;1];
theta = [0;pi/3;2*pi/3];
patch(p,theta,r,'red');

0 comentarios
Más respuestas (0)
Ver también
Categorías
Más información sobre Polar Plots en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!