Polar plots of Angular data

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)

dpb
dpb on 31 May 2017
Edited: dpb on 1 Jun 2017
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

Asked:

on 31 May 2017

Edited:

dpb
on 1 Jun 2017

Community Treasure Hunt

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

Start Hunting!