File Exchange

image thumbnail

Advanced Polar Plots

version 1.0 (65.9 KB) by

Advanced polar plots.

21 Ratings



No License

An improved version of the MATLAB function 'polar'. Supports negative numbers and other plotting features.

Comments and Ratings (34)

Thank you very much for this function!

I had a small problem with the default min-max settings though. I always got the error "Centre value is same as maximum input value". My min and max values were very small (order e-4), such that the following did nothing:
TraceMax = [TraceMax max(Traces{i}(:,1))];
(same for TraceMin)

I could solve it by initializing TraceMax as:
TraceMax = [];
instead of:
TraceMax = '';
(same for TraceMin)


how to use it?
Is there any example?thx!

Jenny Chew

I was tooo lazy and didn't check the above comments before I posted mine. Actually my problem is same as srinivas's posted. Now I downloaded version 2 and it is fixed. Thank you so much, David!!

Jenny Chew

I met a problem when I tried the following simple commands.

a=[1,2,3,4]; b=[2,3,4,5];


Then error showed up:

??? For colon operator with char operands, first and last operands must be char.

Error in ==> pp>PlotTrace at 1262
        x =
Error in ==> pp at 287
    PlotTrace(ThetaPlot, RPlot, PlotProperties, Traces{i+1});


Can anybody help me with this?

shruthy reddy

can u plz help me in plotting (radiation patterns) polar plots with data 0- 50db in matlab


Huizi (view profile)

thank you very much, helpfully


Faisal (view profile)

hi all,

i need demo for this script... can any 1 give it to me.. thx alot

Noelia Oses

Hi all,

I am using pp to plot polar plots and it's great!
However, even though I'm using style 'or' it still plots the lines linking the markers.
Does anyone know what to do so that it doesn't plot the lines?

Thank you very much!!

Jeffrey Hall

Is there anyway that someone could please send me a MATLAB code snippet showing pp.m in all of its glory?
I am evaluating multiple software packages for creating polar plots and am on a tight schedule.

Noelia Oses

Hi all,
I have found this function when searching for how to make the a polar plot look like a compass from 0 to 360 deg clock wise and that the center to 0 axis is vertical pointing up. And this function has done exactly that for me.
However, it doesn't actually plot my data, which was being plotted by polar(theta,rho) just fine.

Does anybody know what's going on?
Thank you very much in advance,

PS: the error message is:

??? For colon operator with char operands, first and last operands
must be char.

Error in ==> pp>PlotTrace at 1262
        x =
Error in ==> pp at 287
    PlotTrace(ThetaPlot, RPlot, PlotProperties, Traces{i+1});

Error in ==> PlotGaitData at 13

Daniel Armyr

Daniel Armyr (view profile)

I added Patzelts fix to the original code and resubmitted it as

  Has anyone had any luck with the fix suggested in the 02 Dec 2008 post?

The reason for the problem above is that the author of Advanced Polar Plots did not concern that PlotBreakFlag might be empty. The present MATLAB versions (e.g. MATLAB Version (R2008b) for Linux) seem to be more sensitive in detecting such mistakes. To avoid the problem I modified pp.m starting with line 1056:
if(InPlotFlag == 1)
    if isempty(PlotBreakFlag)
        PlotBreakFlag = [length(norm_r)];
        PlotBreakFlag = [PlotBreakFlag length(norm_r)];
Hope, this little workaround will help you!


Can you please help me with this problem ? .... I am using Matlab 7.6 .....

I am getting error msg for a simple input data as shown below ......


pp([1 2],[3 4])


??? For colon operator with char operands, first and last operands
must be char.

Error in ==> pp>PlotTrace at 1262
        x =
Error in ==> pp at 287
    PlotTrace(ThetaPlot, RPlot, PlotProperties, Traces{i+1});

Marcus Loh

Excellent help tools

Vasikaran Prabaharan

How to give input data to the function..

Can you give some example using this PP function..

Cloud Chu

I could not use this with R being negative value.

Julian Endres

great work! How can I insert text into the plot using text() or something like that?

Dan Boateng

A try

Michael Bergandi

Doesn't work in R14.

Oliver Tong

It is excellent. Wonderful. But I seem to have a problem with plotting two plots together. When "Hold is on", there seems to be some error.

Isabelle Schmich

very helpfull

Rob S

Awesome! A vast improvement on the standard function.

mike miller

thanks for the great job. it is realy help for polar plot.

one question, i compiled it with matlab 6.5 compiler, but can not run it. it generated the following error at runtime:

conversion to cell from char is impossible

any suggestion?

Marcelo Zeri

I could not use it with subplot...


this 65 KB of code contain a trojan what doesn't help that much with antennas

Pascal Everton

Thanks for the great function! Now I can quickly and easily plot antenna radiation patterns!

Eric L.

Thank you!! Excellent function!

Joe Derk

Geat code! Infinitely better than MATLAB's base polar plot.

Keith Gooley

Spent an hour or two trying to plot antenna radiation patterns without satisfaction. This function did it almost straight away. Thank you.

Shad Holt

this is sweet, after trying to plot radiation powers in polar-logrithmic form for hours, this file allowed me to do it in minutes. great help.
If you need to plat radiation patterns in dB, this is the way to do it.

Steve Hobbs

Easy to use, and great plots of radiation patterns. Thanx!

Catherine Johnson

Very Useful! Thank you

Jim Tonti

After spending too much time trying to plot
radiation patterns the hard way, I tried
this, and all my problems were solved!
It's well thought out, documented, and it works!
Thank you, David.

MATLAB Release
MATLAB 6.1 (R12.1)

Download apps, toolboxes, and other File Exchange content using Add-On Explorer in MATLAB.

» Watch video