If there /is/ to be an updated version of polar2.m at any point, it would be fantastic if it could also give the user control over the number and or spacing of the rho-axis gridlines... something akin to the 'ytick' parameter in cartesian axes. Thanks again!
OK, I wrote an updated version that incormporates your ideas, Peter. However, as I am now a MathWorks employee, there might be issues with me publishing that update. I will comment again when and if an update is released.
Daniel - Thanks for filling the polar plot gap for those of us who work with dB attenuation. I've been using your older 'pp.m' for several years now. Despite it's girth and bugginess, I've come to love the control it grants over the graphical aspects of the plot, such as 'ThetaStartAngle' and 'ThetaDirection'.
I'm working on creating a GUI with a polar plot in it. Reading through the comments on the 'pp' page, I gather that we can't use pp to plot into existing axes (or subplots, for that matter), hence 'polar2.'
So, now I can plot my polar into the axes of my choice - Great! But, I seem to lose control over the orientation of the polar coordinate system and the theta direction. Is there a way to set 0 degrees at the top of the plot and plot clockwise?
Additionally, it appears that rho values that are more negative than the 'CenterValue' aren't truncated, as with pp.m. Instead, they appear to be plotted 'through' the center of the plot, 180 degrees off. in pseudo-code,
Well, you should be able to use the polar2(AX,...) syntax. I haven't tried it, but if that works wit the original polar, it should work with polar2.
It is always better if you can send the axes as an argument to the function rather than to first set the axes and then plotting. In GUIs, things can happen that change the CGA even between two lines of code in the same function.
I have written you a pp.m. If I have understood you good, I writte you here. In my GUI I have two axes where I want to draw a radiation pattern (planes horizontal and vertical). The values are negative y therefore I want to use polar2.m. How can I draw in my axes? For example:
@senthil: I am sorry, but I do not udnerstand your question. You seem to have an idea of what your theta values shoudl be. In that case, can't you just set your theta values to what you want and plot it?
I am using ur polar2.m file for plotting. If i have some 2000 rho values in set A, Is it possible to push the data (theta) to start from say 700 to 2700. so i the initial part will be blank. This i need to do (by hold ON) on 4 set of values that will be over laid. so finally i will get concentric ring of values while the central 700 region is empty.
@Judy: Well, actually. This is the Mathworks original polar.m with just a few modifications to get the features I wanted. So unfortunately, I can't answer for that part of the code since I didn't write it.
Actually, looking into this more, this actually does plot the graph, but the error keeps coming up, so I just commented the last part out. I don't think it is necessary? What was the purpose for making the mcode at the end? Thank you!!