I'm attempting to plot a color gradient which I would like to be uniform along an axis (in the case of the picture below defined by the angle pi/7
)
When I use the patch
command, The plot matches the desired gradient direction, but is not uniform along it (all sorts of triangles are formed between the points along the circle)
here is the code
N=120;
theta = linspace(-pi,pi,N+1);
theta = theta(1:end-1);
c = exp(-6*cos(theta-pi/7));
figure(1)
patch(cos(theta),sin(theta),c)
ylabel('y'); xlabel('x')
axis equal