Code covered by the BSD License  

Highlights from
Advanced Polar Plots v2

5.0

5.0 | 3 ratings Rate this file 37 Downloads (last 30 days) File Size: 14.9 KB File ID: #22859

Advanced Polar Plots v2

by

 

02 Feb 2009 (Updated )

An improved version of the MATLAB function 'polar'.

| Watch this File

File Information
Description

 An improved version of the MATLAB function 'polar'. Supports negative numbers and other plotting features. David Ireland's original completed with Dr. Thomas Patzelt's bugfix.

Acknowledgements

Advanced Polar Plots inspired this file.

This file inspired Polar 2.

MATLAB release MATLAB 7.7 (R2008b)
Tags for This File   Please login to tag files.
Please login to add a comment or rating.
Comments and Ratings (22)
30 Jun 2014 Fernando Bergami  
24 May 2013 Daniel Armyr

Hello everyone.
Don't use this file. Go here instead and get the much better version:
http://www.mathworks.com/matlabcentral/fileexchange/23589

03 May 2012 Daniel Armyr

LORENA: This file uses a very bad method of drawing and can therefore not be used to draw inside existing plots or subplots. However, that is completely possible with my other submission, polar2. Now, if there is a feature in this file that you need and cannot find in polar2, just let me know with a comment to that file, and I will check if I can implement it.

02 May 2012 LORENA

Hello,
I have loaded pp.m. I would like to show my graphics in axes_handles,is this possible? (I have a GUI), because I have been looking the code and I don't know how change this option. Thank you, Lorena.

23 May 2011 Daniel Armyr

As mentioned, use http://www.mathworks.com/matlabcentral/fileexchange/23589 instead.

21 Jul 2009 Mohamad

I'm plotting normalized power radiation pattern in dB scale 0 to [-inf]. Your code does not seem to work at all when 0 is defined as the maximum value. When I try with other data with 0 as the least value, your code works awesome.

02 May 2009 Daniel Armyr

To be clear, I have given upp support of this function in favour of "polar 2" which can be found here.
http://www.mathworks.com/matlabcentral/fileexchange/23589

Polar 2 has less features, but has relatively cleaner code and is less prone to bugs.

If someone else wants to maintain this file, feel free. Just do the bugfixes and upload it under your own name,

01 May 2009 Brian

There is a typographical error in line 180.

'oc_ring_border_line_width'
should be
'oc.ring_border_line_width'

Cheers.

20 Apr 2009 Jonas

There is an error at least on OS X - the variables TraceMax and TraceMin are initialized as empty stings, which leads to strange behavior when catenating with doubles.
This leads to the error 'Centre value is same as maximum input value' being thrown erroneously.

I suggest changing lines 1326 and 1313 to
TraceMax = [];
TraceMin = [];
respectively.

09 Apr 2009 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!!
Noelia

08 Apr 2009 Daniel Armyr

Sorry, the new file is called 'polar 2' and nothing else.

07 Apr 2009 Daniel Armyr

@sls
That is correct. This function has very many limitations. My suggestion is to rewrite the function with a bit less functionality and fewer ugly hacks, or pester your local Mathworks representative to improve the functionality of the built-in polar function.

07 Apr 2009 sls

It doesn't seem to work with the function subplot. Any tips? I want to plot multiple polar plots in one figure.

03 Apr 2009 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.

Thanks.

03 Apr 2009 Daniel Armyr

Specifically, pp can plot negativ radii. If you type help pp and read through the first few paragraphs, it will tell you.

02 Apr 2009 Jeffrey Hall

Could someone please post an example showing some or all of the advanced features that Advanced Polar Plots v2 offers over the regular MATLAB polar() command?

Thanks

31 Mar 2009 Noelia Oses

Please ignore my last entry. I didn't realise I was still using the old version. Now it works perfectly. This is fantastic!!!!

31 Mar 2009 Noelia Oses

Hi Daniel,

Thanks a lot for this!!
I came across your function looking for how to make 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.

Now I get what I wanted but unfortunately I get some error messages and pp.m doesn't plot my data.

Any help you might provide is very much appreciated.

The error messages are the following:

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

Error in ==> pp>PlotTrace at 1262
x = norm_r(PlotStartFlag(i):PlotBreakFlag(i)).*cos(theta(PlotStartFlag(i):PlotBreakFlag(i)));

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

Error in ==> PlotGaitData at 23
pp(theta,rho,'-or','ThetaDirection','cw','ThetaStartAngle',270,'CentreValue',0)

Thanks,
Noelia

24 Mar 2009 Daniel Armyr

OK, new version uploaded for review with Vincents fix and a fix for the missing return argument bug.

23 Mar 2009 Vincent Blandeau

I am using Matlab R2008b and the routine was bugging because the variables PlotStartFlag and PlotBreakFlag were defined as "char" on lines 1027-1028, instead of arrays.

The bug was fixed by modifying lines 1027-1028 as :

PlotStartFlag = [ ];
PlotBreakFlag = [ ];

Thank you by the way for this very nice function :-)

11 Feb 2009 Daniel Armyr

Unfortunately not. The function will plot into the entire current figure, overwriting all its settings with a "clf reset" before starting.

10 Feb 2009 tstmwind

Are you able to specify the axis handle for this function as you can for polar.m? EX: polar(axish,theta,rho)

Updates
24 Mar 2009

Removed the return argument as it isn't defined anywhere in the function.

Contact us