Polar plots of Angular data
Show older comments
I have an array of angles(in Radians), I want to display them in polar plot with radial distance =1 and the angles scattered around a circle. I want to display the values of the angles or the marker values like 1,2,3... on the data points.
Answers (1)
For starters, "salt to suit"...
>> theta=rand(3,1)*2*pi; r=ones(size(theta)); % arbitrary r,theta vectors
>> hLp=polar(theta,ones(size(theta)),'r*'); % plot with marker
>> [x,y]=pol2cart(theta,r); % cartesian coordinates for same
>> hTxt=text(x+0.1,y,num2str([[1:length(x)].' convert2deg(theta)], ...
'Point %d %.1f^{\\o}, 'verticalalign','middle');
If you have R2016 or later, use polarplot instead which will give you opportunity to fix up the axes limits, etc., etc., ... don't have here to demo.
Categories
Find more on Polar 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!