how to change the values on the polar axis?

1 次查看(过去 30 天)
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

回答(1 个)

Walter Roberson
Walter Roberson 2011-7-12
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'

类别

Help CenterFile Exchange 中查找有关 Polar Plots 的更多信息

标签

Community Treasure Hunt

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

Start Hunting!

Translated by