File Exchange

polarLabels

version 2.0.0.0 (10.9 KB) by Brian Katz

Brian Katz (view profile)

Modified polar plot to allow for rotation/dilation of polar plot labels.

Updated 18 Mar 2017

Modified version of standard POLAR plot function to allow for rotation of plot labels (not the plot itself). Also allows for redefinition of the radius labels to allow for data containing negative values not having negative radii (as is often the case with dB in acoustics). Originally created for directivity plots but is useful for other tasks. Allows for semi-circle polar plotting, custom radial grid steps, and custom radial label angle.
Returns handles to text labels and grids for latter modifications.
Tested with MatLab version R12, R14, and 2017a.
Reverse compatible with old POLAR syntax.

Cite As

Brian Katz (2020). polarLabels (https://www.mathworks.com/matlabcentral/fileexchange/3483-polarlabels), MATLAB Central File Exchange. Retrieved .

Brian Katz

Brian Katz (view profile)

Rather than editing the code, a quick and dirty way to switch the direction of the coordinate system is to just switch the sign on the labels:

for LOOP=1:length(anglab_h);
set(anglab_h(LOOP),'String',( int2str(-1*str2num(get(anglab_h(LOOP),'String'))) ));
end

I think this is better than adding yet another option to the function.

wei

wei (view profile)

amazingly，it help me a lot

Dirk Oschlies

Works fine!
Excellent work. Exactly this function is missing in MatLab, when working with directivity patterns.

I just had to invert the signs of the angles, for "my" coordinate-system

A Mancil

When I click on this link, the file appears corrupted, i.e. some characters appear to be in Chinese

Brian Katz

Ex:> polarlabels([0:360]*pi/180,abs(sin([0:360]*pi/180))*10,'b',-90,-10);
This has been added to the file

Tim Dalrymple

an example would help