How can I plot a polar plot with varying colour
显示 更早的评论
I have three values azimuth(A), elevation(E) and corresponding data values(V). I plot a polar plot using the command polar(A,V), and the plot I got is given below. But I want to show my third value ie; my data values corresponding to each azimuth and elevation in varying colour. is it possible?
I am attaching the data file herewith kindly looking for your suggestions

Thanking You
回答(2 个)
José-Luis
2017-9-12
1 个投票
If you have R2016b or more recent:
2 个评论
john pappachen
2017-9-12
José-Luis
2017-9-12
Please accept the answer that best solves your problem.
Star Strider
2017-9-12
D = load('data.txt');
Az = D(:,1);
El = D(:,2);
Rd = D(:,3);
cn = ceil(max(El)); % Number Of Colors
cm = colormap(jet(cn));
figure(2)
polarscatter(Az*pi/180, Rd, [], cm(fix(El),:), 'filled')
grid on
类别
在 帮助中心 和 File Exchange 中查找有关 Polar Plots 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!