How do I fit this contourf plot in polar coordinates?
Show older comments
Hi there,
dist = 21x144 array. I want 'dist' to form a ring donut shape around the middle the upper data starting at r = 20 and the lower limit at r = 21. And the 144 being each th step at the moment I just make this: http://postimg.org/image/pytok4msf/
code:
[r,t] = meshgrid(0:.1:5,0:pi/30:(2*pi));
z = r - t;
% Convert to Cartesian
x = r.*cos(t);
y = r.*sin(t);
h = polar(x,y);
hold on;
contourf(dist);
% Hide the POLAR function data and leave annotations
set(h,'Visible','off')
% Turn off axes and set square aspect ratio
axis off
axis image
Answers (0)
Categories
Find more on Contour Plots in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!