how to change the values on the polar axis?

2 views (last 30 days)
bsd
bsd on 11 Jul 2011
Dear sir/madam,
I am plotting antenna radiation patterns using matlab, using polar command. When I plot the radiation pattern using the polar command the polar axis shows [0 to 360] degrees. This is good for azimuthal angle. But for the elevation angle I need the polar axis to be shown as [0 to 180] on one side and [0 to -180] on the other side. How can I do this in matlab? Looking forward for your reply.
Thanking you, BSD

Answers (1)

Walter Roberson
Walter Roberson on 12 Jul 2011
polar(....);
ph = allchild(gca); %hidden children!!
Now, ph(6:17) are handles of text() objects whose String property is an angle. The correspondences are:
6: 0, 7: 180, 8: 330, 9: 150, 10: 300, 11: 120, 12: 270, 13: 90, 14: 240, 15: 60, 16: 210, 17: 30
Thus you would, for example, set(ph(8),'String','-30')
If you want the -180 to appear, you are going to have to text() a new label in to place. You could get() the Position of ph(7), fudge it a bit, and text() the '-180' in to place beside the '180'

Categories

Find more on Polar Plots in Help Center and File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!